Closed mcdemarco closed 2 years ago
One easy fix would be to change the target for expanding/contracting from the whole title area to the expand/collapse indicator on the right. However, that's giving a very small target area, particularly on mobile devices.
A more sophisticated solution would be to try to distinguish between tapping/clicking and dragging.
Any thoughts?
So the following returns the current selection:
window.getSelection().toString()
So if you just clicked, selection should be emptied, but if the selection contains text, it means the click was from a selection rather than a single click.
I think adding this check before the collapse might be sufficient. I've been testing on desktop, and it seems to work well. I haven't tested on mobile yet.
I think it shouldn't be happening at all, but it's hard to track down why it is happening because React puts all the event handlers on the whole body. If it doesn't cause other issues then I guess a workaround would work.
I think #91 resolves this. Let me know what you think.
In a context where the item is collapsible, it collapses on mouseup when trying to select text with the mouse. This behavior includes the title and participants, and is unexpected. It was still happening for me on main as of today.
I sent the user who had this problem to our non-interactive version of the schedule. Another workaround is to visit the item permalink.