-
Notifications
You must be signed in to change notification settings - Fork 227
Event delegation #353
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
Merged
Merged
Event delegation #353
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
234b419
Event delegation
joaquinelio e06394e
Update 2-ui/2-events/03-event-delegation/2-sliding-tree/task.md
joaquinelio 5dc484e
Update 2-ui/2-events/03-event-delegation/3-sortable-table/task.md
joaquinelio ff39c36
Update 2-ui/2-events/03-event-delegation/3-sortable-table/task.md
joaquinelio 475c3e7
Update 2-ui/2-events/03-event-delegation/4-behavior-tooltip/task.md
joaquinelio 5e45108
Update 2-ui/2-events/03-event-delegation/4-behavior-tooltip/task.md
joaquinelio 84c78f0
Update 2-ui/2-events/03-event-delegation/4-behavior-tooltip/task.md
joaquinelio b23c55e
Update 2-ui/2-events/03-event-delegation/4-behavior-tooltip/task.md
joaquinelio 9517ef9
Update 2-ui/2-events/03-event-delegation/4-behavior-tooltip/task.md
joaquinelio 7e24604
Update 2-ui/2-events/03-event-delegation/article.md
joaquinelio f1cf397
Update article.md
joaquinelio 031c98a
Update task.md
joaquinelio c213810
Update 2-ui/2-events/03-event-delegation/article.md
joaquinelio 4848363
Update 2-ui/2-events/03-event-delegation/article.md
joaquinelio 4c69af1
Update 2-ui/2-events/03-event-delegation/article.md
joaquinelio 41c7660
Apply suggestions from code review
joaquinelio 789814d
"propagación" de eventos
joaquinelio 2ec1979
Update 2-ui/2-events/03-event-delegation/article.md
EzequielCaste 1f09fd1
Update 2-ui/2-events/03-event-delegation/article.md
EzequielCaste 37fc3f3
Update 2-ui/2-events/03-event-delegation/article.md
EzequielCaste 69391c0
Update 2-ui/2-events/03-event-delegation/article.md
EzequielCaste 0d26d8e
Update 2-ui/2-events/03-event-delegation/article.md
EzequielCaste e92bf90
Update 2-ui/2-events/03-event-delegation/4-behavior-tooltip/task.md
joaquinelio 82ef753
Update 2-ui/2-events/03-event-delegation/4-behavior-tooltip/task.md
joaquinelio 204f06a
Update 2-ui/2-events/03-event-delegation/4-behavior-tooltip/task.md
joaquinelio 91d4874
Update article.md
joaquinelio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
The solution has two parts. | ||
La solución tiene dos partes. | ||
|
||
1. Wrap every tree node title into `<span>`. Then we can CSS-style them on `:hover` and handle clicks exactly on text, because `<span>` width is exactly the text width (unlike without it). | ||
2. Set a handler to the `tree` root node and handle clicks on that `<span>` titles. | ||
1. Envuelve cada nodo de título del árbol dentro de `<span>`. Luego podemos aplicarles CSS-style en `:hover` y manejar los clics exactamente sobre el texto, porque el ancho de `<span>` es exactamente el ancho del texto (no lo será si no lo tiene). | ||
2. Establece el manejador al nodo raíz del `tree` y maneja los clics en aquellos títulos `<span>`. | ||
vplentinax marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.