My intention was to select and copy the <dt> text, but this action can also trigger the toggle, this is a common pitfall in JS based component stackoverflow.com/questions/…. can CSS Toggles somehow avoid it? @tabatkins @davidbaron
1
2
0
No, that'll probably act the same. Somewhat unavoidable, I think.
1
Clickable elements in HTML(<a>,<label>) do not have this behavior.
1
A tradeoff here is whether you want the action to happen on mousedown or mouseup. (Really mousedown versus click, but click happens when mouseup happens.) mousedown happens sooner so feels more responsive/performant to users. click doesn't fire when mouse moves (far enough).
1
I think there's generally been a trend towards performing actions on mousedown because it feels faster.

Oct 14, 2022 · 1:34 PM UTC