-
Notifications
You must be signed in to change notification settings - Fork 113
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
Only register click handler once #1480
Conversation
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
🦋 Changeset detectedLatest commit: dae2bc7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
d7308b3
to
dae2bc7
Compare
@@ -83,5 +84,6 @@ | |||
"tslib": "^2.4.0", | |||
"typescript": "^4.7.4" | |||
}, | |||
"prettier": "@github/prettier-config" | |||
"prettier": "@github/prettier-config", | |||
"browserslist": "extends @github/browserslist-config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a browserslistrc file I added recently, could you delete that in favor of this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: saw that you did 😂
* Update `eslint-plugin-github` Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com> * Use `@github/browserlist-config` Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com> * Update caniuse-lite db Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com> * Fix shadowed variable Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com> * Only register click handler once * changeset Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
Description
The
<modal-dialog>
registers a global event handler each time it connects to the DOM. We actually just want one global event handler so that we don't open or close multiple dialogs when clicking around on the page.This PR makes sure we only register the event handler once by using a function reference instead of a inlined function for the click handler.
Closes #1366 (again :)