Event log: an event's ID can be selected without toggling it (closes #348)
check / check (push) Successful in 3m19s
check / check (push) Successful in 3m19s
An event's row in the event log was a button element, whose text a browser does not let be selected, and a drag over the event's ID toggled the event. The row is now an element with the button role: focusable, toggled by Enter and Space, and saying whether it is expanded. A click that ends a text selection leaves the event as it is. The browser test now also clicks the row's caret, selects the ID with the mouse, and uses the keyboard. Model: opus-5-5
This commit is contained in:
@@ -82,6 +82,13 @@ document.addEventListener("alpine:init", function () {
|
||||
toggle() {
|
||||
this.open = !this.open;
|
||||
},
|
||||
// Toggles, except on a click that ends a text selection, such
|
||||
// as selecting an event's ID to copy it.
|
||||
toggleUnlessSelecting() {
|
||||
if (window.getSelection().toString() === "") {
|
||||
this.toggle();
|
||||
}
|
||||
},
|
||||
get closed() {
|
||||
return !this.open;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user