James Edwards on Nostr: In Safari, focusing an element destroys the current selection range. That's bad ...
In Safari, focusing an element destroys the current selection range.
That's bad enough, but get this -- the reset has *already happened* when the `focus` event fires, so we can't snapshot the data because it's already lost. And yet the resulting `selectionchange` event **hasn't** fired yet, so we can't use that event to filter-out the change.
Are you fucking kidding me??
#javascript #selection #caret
That's bad enough, but get this -- the reset has *already happened* when the `focus` event fires, so we can't snapshot the data because it's already lost. And yet the resulting `selectionchange` event **hasn't** fired yet, so we can't use that event to filter-out the change.
Are you fucking kidding me??
#javascript #selection #caret