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

Reset dispatching flags when retargeting to a different target than event's #402

Closed
wants to merge 1 commit into from

Conversation

nox
Copy link
Member

@nox nox commented Jan 22, 2017

This repeats step 14 in step 4's shortcut of dispatching an event.

…vent's

This repeats step 14 in step 4's shortcut of dispatching an event.
@annevk annevk added the topic: shadow Relates to shadow trees (as defined in DOM) label Jan 23, 2017
@annevk
Copy link
Member

annevk commented Jan 23, 2017

This looks good to me. @hayatoito? But maybe we should instead use a "jump to label" thing to avoid introducing more such issues going forward?

We'll also need tests.

@annevk annevk added the needs tests Moving the issue forward requires someone to write tests label Jan 23, 2017
@hayatoito
Copy link
Member

hayatoito commented Jan 24, 2017

Looks good to me. As an alternative idae, how about re-ordering steps 1-4?

Moving "1. Set event's dispatch flag"
into after "4. If target is relatedTarget and target is not event’s relatedTarget, then return true."

I think that does not change the semantics, and would make our intention more clear.

@annevk
Copy link
Member

annevk commented Jan 24, 2017

Yeah, that is probably best @hayatoito. Thanks!

@nox
Copy link
Member Author

nox commented Jan 24, 2017 via email

@annevk
Copy link
Member

annevk commented Jan 24, 2017

That is true. I guess the question is whether you expect those to be always unset even if the event didn't really end up dispatching. (The main reason they're unset at the end is because listeners might have set them.)

I don't think it matters much what we do since this is new behavior. So we get to decide what makes sense for this edge case (and write tests for it).

I kinda like @hayatoito's fix since it's simple, but I'm willing to go for the alternative if there's a good reason.

@nox
Copy link
Member Author

nox commented Jan 24, 2017 via email

@annevk
Copy link
Member

annevk commented Jan 24, 2017

@smaug---- thoughts either way?

@smaug----
Copy link
Collaborator

I guess the pr is fine.

@annevk
Copy link
Member

annevk commented Mar 12, 2018

I can try work on a new PR for this after #585 lands.

@annevk
Copy link
Member

annevk commented Mar 12, 2018

Though maybe I should include it there, once that has had some more review.

annevk added a commit that referenced this pull request Mar 15, 2018
annevk added a commit that referenced this pull request Mar 27, 2018
@annevk annevk closed this in fc16564 Mar 28, 2018
@nox nox deleted the reset-retargeting branch March 29, 2018 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs tests Moving the issue forward requires someone to write tests topic: shadow Relates to shadow trees (as defined in DOM)
Development

Successfully merging this pull request may close these issues.

4 participants