This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -78,9 +78,9 @@ If we omit `return false`, then after our code executes the browser will do its
By the way, using event delegation here makes our menu very flexible. We can add nested lists and style them using CSS to "slide down".
````smart header="Follow-up events"
Certain events flow one into another. If we prevent the first event, there will be no second.
Certain events flow one into another. If we prevent the browser default action for the first event, subsequent events may not happen.
For instance, `mousedown` on an `<input>` field leads to focusing in it, and the `focus` event. If we prevent the `mousedown` event, there's no focus.
For instance, `mousedown` on an `<input>` field leads to focusing in it, and the `focus` event. But if the browser default action for the `mousedown` event is prevented, there's no focus.
Try to click on the first `<input>` below -- the `focus` event happens. But if you click the second one, there's no focus.
Expand All
@@ -89,7 +89,7 @@ Try to click on the first `<input>` below -- the `focus` event happens. But if y
That's because the browser action is canceled on `mousedown`. The focusing is still possible if we use another way to enter the input. For instance, the `key:Tab` key to switch from the 1st input into the 2nd. But not with the mouse click any more.
That's because the browser default action is canceled on `mousedown`. The focusing is still possible if we use another way to enter the input. For instance, the `key:Tab` key to switch from the 1st input into the 2nd. But not with the mouse click any more.
````
## The "passive" handler option
Expand Down
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: correct terms in default-browser-action article.md en #3956
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
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
fix: correct terms in default-browser-action article.md en #3956
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing