ordinary-puzzles-app
ordinary-puzzles-app copied to clipboard
web: Sometimes text gets draggable while playing
Still not sure how to consistently reproduce but the issue is definitely there (Chrome).
Example: https://imgur.com/br7refv
Hi, I'm the Redditor who reported it. I can give a bit more context.
Chrome 86.0.4240.193 (Windows, Chrome OS, I tried both)
I can trigger reliably: Just imagine that the cells on the page are an HTML table of text, and drag a box over a number of cells. You can't see the selection, but it is selected. (Right-click on the selected area, Chrome allows you to "copy" and "search Google for" the selected numbers.) Now, drag one of the cells you already selected, and you will see the text selection drag, rather than expanding a box.
I think I actually stumbled upon a simple fix for this in devtools. You just need to set the CSS user-select
property to none
on the game board element. (Or on the entire page, but you may wish for the other UI text to be selectable.)
Yup: typing this in console fixes the issue completely!
document.querySelector('.r-1loqt21').style.userSelect = 'none';
Of course the proper fix is to set that style in the CSS source ('.r-1loqt21'
is just the minified name) but there's a proof-of-concept fix.
Thanks! I'm already disabling the user selection in a few places, I suppose I might be missing a component/wrapper where it should be applied to (probably on the absolutely positioned borders). I'll check 👍