Skip to content

Conversation

@mertcanaltin
Copy link
Member

issue: #50401

In this issue, we addressed the problem where setting cancelBubble to true unintentionally called the stopPropagation method. The solution ensures that stopPropagation is only called when cancelBubble is explicitly set to false, as it should be. This change prevents the method from being called when cancelBubble is true or not explicitly set

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Oct 26, 2023
@mertcanaltinmertcanaltin added events Issues and PRs related to the events subsystem / EventEmitter. eventtarget Issues and PRs related to the EventTarget implementation. labels Oct 26, 2023
@anonrig
Copy link
Member

Can you add a test?

Copy link
Member

@benjamingrbenjamingr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test, changes lgtm

@mertcanaltin
Copy link
MemberAuthor

mertcanaltin commented Nov 12, 2023

ı added a test

thrownewERR_INVALID_THIS('Event');
if(value){
this.stopPropagation();
this.#propagationStopped =true;
Copy link

@jeanbernjeanbernNov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is setting cancelBubble supposed to be one-way? The proposed change doesn't modify this.#propagationStopped when value is false

nvm: For anyone else wondering the same thing see here: whatwg/dom#211

@deokjinkimdeokjinkim added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 9, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 9, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@mertcanaltin
Copy link
MemberAuthor

I wonder if I should do an update here?

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@mertcanaltinmertcanaltin added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 3, 2024
@mertcanaltinmertcanaltin removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 3, 2024
@mertcanaltin
Copy link
MemberAuthor

I guess flakky was the test 🤔 💭

@benjamingrbenjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 6, 2024
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 6, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@mertcanaltinmertcanaltin added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 17, 2024
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 17, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@mertcanaltin
Copy link
MemberAuthor

passed 🎉🚀

@mertcanaltin
Copy link
MemberAuthor

@benjamingr I would be very happy if you can make an update here, now it seems to have passed all the tests

@mertcanaltinmertcanaltin added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 18, 2024
Copy link
Member

@mhdawsonmhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mhdawson
Copy link
Member

@mertcanaltin I'm getting this warnings when landing -
GitHub cannot link the author of 'events: setting event cancelBubble calls stopPropagation' to their GitHub account.
⚠ Please suggest them to take a look at https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork

Can you take a look? I'll land anyway but would be good to get that fixed up.

mhdawson pushed a commit that referenced this pull request Feb 26, 2024
PR-URL: #50405 Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Deokjin Kim <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@mhdawson
Copy link
Member

Landed in 399654f

@mertcanaltin
Copy link
MemberAuthor

I am very sorry for the late response, thank you very much for correcting me @mhdawson ❤️ 🚀

marco-ippolito pushed a commit that referenced this pull request Feb 27, 2024
PR-URL: #50405 Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Deokjin Kim <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@marco-ippolitomarco-ippolito mentioned this pull request Mar 1, 2024
richardlau pushed a commit that referenced this pull request Mar 25, 2024
PR-URL: #50405 Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Deokjin Kim <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
richardlau pushed a commit that referenced this pull request Mar 25, 2024
PR-URL: #50405 Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Deokjin Kim <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@richardlaurichardlau mentioned this pull request Mar 25, 2024
rdw-msft pushed a commit to rdw-msft/node that referenced this pull request Mar 26, 2024
PR-URL: nodejs#50405 Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Deokjin Kim <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.eventsIssues and PRs related to the events subsystem / EventEmitter.eventtargetIssues and PRs related to the EventTarget implementation.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@mertcanaltin@anonrig@nodejs-github-bot@mhdawson@jasnell@jeanbern@benjamingr@deokjinkim@KhafraDev