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

Make drag & drop events composed #1922

Open
annevk opened this issue Oct 18, 2016 · 7 comments
Open

Make drag & drop events composed #1922

annevk opened this issue Oct 18, 2016 · 7 comments
Labels
topic: events topic: shadow Relates to shadow trees (as defined in DOM)

Comments

@annevk
Copy link
Member

annevk commented Oct 18, 2016

Discussed this with @rniwa.

  • click()
  • contextmenu (most likely)
  • drag & drop? (not discussed)
@annevk annevk added the topic: shadow Relates to shadow trees (as defined in DOM) label Oct 18, 2016
domenic pushed a commit that referenced this issue Oct 18, 2016
This aligns firing and dispatching of events with updated terminology in
the DOM Standard. Among the changes:

* A lot less usage of "default action" which isn't really a thing.
  Instead we make use of the return value of the fire and dispatch
  algorithms.
* Instead of saying things bubble or are cancelable we initialize the
  attributes as such.
* We no longer re-state defaults for isTrusted, bubbles, and cancelable,
  as that only leads to confusion when they are *not* re-stated.
* We now use the legacy target override flag rather than supplying a
  named argument.

This fixes #1713, but plenty of follow up issues remain:

* #805 for the remainder of "default action" usage
* #1394 for updating synthetic click events
* #1887 for removing "fire a simple event" usage
* #1893 for updating when checkboxes get checked
* #1900 for figuring out if event dispatch requires more hooks
* #1912 for revisiting isTrusted usage
* #1913 for updating synthetic mouse events
* #1922 for making more events composed
@annevk
Copy link
Member Author

annevk commented Nov 17, 2016

@hayatoito any thoughts on this?

I'm happy to tackle click() and contextmenu, but drag & drop seems like its own can of worms in that I'm not sure how well everything there matches implementations to begin with.

@hayatoito
Copy link
Member

  • click() - I prefer composed events for click(), which matches Blink's current implementation.
  • contextmenu - I do not have a strong opinion, but it sounds UI-ish Events. I am fine to make it a composed event.
  • drag & drop - Hmm. I remember that I thought of this event. However, for some reasons, I deferred the decision. Maybe this is not easy to define how drag & drop should work across Shadow DOM boundaries. Let me think again about it later.

annevk added a commit that referenced this issue Sep 4, 2017
Tests: see shadow-dom/event-composed.html in web-platform-tests.

Fixes WICG/webcomponents#578 and part of #1922.
@annevk
Copy link
Member Author

annevk commented Sep 4, 2017

Synthetic contextmenu event dispatching went away in e7e8c88. #2999 has a patch for synthetic mouse events. That leaves drag & drop.

@domenic
Copy link
Member

domenic commented Sep 4, 2017

@annevk I think the contextmenu event is unrelated to the menu element. It's basically a right-click event.

@annevk
Copy link
Member Author

annevk commented Sep 4, 2017

@domenic the commit I pointed to had the only text that actually ended up dispatching an event named contextmenu as far as I can tell.

@annevk
Copy link
Member Author

annevk commented Sep 4, 2017

(I suspect UI Events might (should) have similar text, but that's not the HTML Standard.)

annevk added a commit that referenced this issue Sep 6, 2017
Tests: see shadow-dom/event-composed.html in web-platform-tests.

Fixes WICG/webcomponents#578 and part of #1922.
@annevk annevk changed the title Make some events composed Make drag & drop events composed Sep 6, 2017
@annevk
Copy link
Member Author

annevk commented Sep 6, 2017

So the remaining open question here is whether drag & drop events need to be composed. They are UI Events of sorts so that would suggest they should be, but there might be some complications I'm not aware of. Input welcome from @whatwg/components and whoever else has opinions.

alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
This aligns firing and dispatching of events with updated terminology in
the DOM Standard. Among the changes:

* A lot less usage of "default action" which isn't really a thing.
  Instead we make use of the return value of the fire and dispatch
  algorithms.
* Instead of saying things bubble or are cancelable we initialize the
  attributes as such.
* We no longer re-state defaults for isTrusted, bubbles, and cancelable,
  as that only leads to confusion when they are *not* re-stated.
* We now use the legacy target override flag rather than supplying a
  named argument.

This fixes whatwg#1713, but plenty of follow up issues remain:

* whatwg#805 for the remainder of "default action" usage
* whatwg#1394 for updating synthetic click events
* whatwg#1887 for removing "fire a simple event" usage
* whatwg#1893 for updating when checkboxes get checked
* whatwg#1900 for figuring out if event dispatch requires more hooks
* whatwg#1912 for revisiting isTrusted usage
* whatwg#1913 for updating synthetic mouse events
* whatwg#1922 for making more events composed
alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
Tests: see shadow-dom/event-composed.html in web-platform-tests.

Fixes WICG/webcomponents#578 and part of whatwg#1922.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: events topic: shadow Relates to shadow trees (as defined in DOM)
Development

No branches or pull requests

3 participants