Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define the order between select and selectionchange #129

Open
saschanaz opened this issue Dec 11, 2020 · 3 comments
Open

Define the order between select and selectionchange #129

saschanaz opened this issue Dec 11, 2020 · 3 comments

Comments

@saschanaz
Copy link
Member

saschanaz commented Dec 11, 2020

There is no defined order between them.

  • Mouse drag: selectionchange first and then select.
  • Shift+arrow keys on keyboard: select first and then selectionchange.
  • Selection setter APIs e.g. selectionStart: select first on Gecko, no consistency on Blink (it's racy).

The mouse drag case fires multiple selectionchanges and then a select event at mouseup. I think selectionchange events should be fired before select events to keep it that way.

@annevk
Copy link
Member

annevk commented Dec 11, 2020

I guess we should define both in the same specification as well? Probably HTML?

@rememberlenny
Copy link

Am I correct to assume touch devices would also need to be considered here? I'm unfamiliar with the selection API in relation, but I understand the touchstart and touchend events sandwich the selectionchange event.

@annevk
Copy link
Member

annevk commented Jan 20, 2021

Yeah, that would make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants