The window is user-select: none outside text it marks as text, and a
group's card is one big click target that opens the editor. So on the
Routing page a group's 模式 (patterns) line, its members line, its quota
lines and its name could not be copied: the members and names were not
selectable at all, and a drag across a pattern's code (selectable) ended
in a click on the card that opened the editor and threw the selection
away. The editor's model and account-provider names were not
selectable either.
Now:
- routing.css: a card's name, group/<id>, and every .mem line
(members, patterns, quota, classifier failure), and the editor's
member, pattern and account rows' names (.fbrow > .n) are
user-select: text, except while their list is being sorted. Controls
(routing tag, handle, Edit, switches, Remove, Up/Down) stay none.
- client.js groupRow: a click that ends a drag-select inside the card
does not open the editor; it compares the selection at pointerdown,
so a plain click with an old selection still opens it.
Not changed: a double-click on a word in the card still opens the
editor on its first click (the card opens on click, as before).
Test: internal/gui/tests/group-select-copy.test.cjs, chromium + webkit,
en + zh: drags across the pattern, the members line and group/free on
the card select them and leave the editor shut, no scroll moves; a click
still opens the editor; in the editor a model's name and a pattern drag
to a selection; controls compute user-select none; nothing is posted.
Broken by hand: client.js reverted alone -> 4/4 red ('' !== 'or/*:free',
the editor opened); routing.css reverted alone -> 4/4 red (members line
not selected).
Run on mote at base 1ccad582d, then again after the rebase onto a10ad0ec8
(one routing commit, #5413): group-select-copy, group-patterns,
group-arrange 12/12. At the base: the new test 4/4; 55 GUI files
(group-*, routing-group*, routing-groups*, routing-editor-foot,
panel-routing*, click-scroll, user-select, fallback-group, i18n-keys) in
both engines: 569/572. Reds, both red without this change too:
- group-found-skip "webkit de 390px" (and chromium de 390px in the
4-wide run): red 2/2 alone at the base with the change reverted, #4617.
- i18n-keys "a plugin's words are its own": #5327, #5426, #5482.
go test -tags nogui ./internal/gui: ok (197s).
Reported-by: jiabubu (Discord)