diff --git a/2-ui/2-events/02-bubbling-and-capturing/article.md b/2-ui/2-events/02-bubbling-and-capturing/article.md index 2448cfa5b..d5d0b1120 100644 --- a/2-ui/2-events/02-bubbling-and-capturing/article.md +++ b/2-ui/2-events/02-bubbling-and-capturing/article.md @@ -1,24 +1,24 @@ # Bubbling and capturing -Let's start with an example. +Vamos começar com um exemplo. -This handler is assigned to `
`:
+Este manipulador de eventos foi atribuído a ``, mas também é acionado caso você clique em qualquer elemento aninhado como `` ou ``:
```html autorun height=60
- If you click on EM
, the handler on DIV
runs.
+ Se você clicar noEM
, o manipulador na DIV
será acionado.
```
-Isn't it a bit strange? Why does the handler on `` run if the actual click was on ``?
+Não é um pouco estranho? Por que o manipulador na `` é acionado se o clique foi no ``?
## Bubbling
-The bubbling principle is simple.
+O *bubbling*(borbulhamento) é simples.
-**When an event happens on an element, it first runs the handlers on it, then on its parent, then all the way up on other ancestors.**
+**Quando um evento acontece em um elemento, ele primeiro executa os manipuladores nesse elemento, depois em seu elemento pai, e em seguida, sobe pelos outros ancestrais.**
-Let's say we have 3 nested elements `FORM > DIV > P` with a handler on each of them:
+Vamos supor que tenhamos 3 elementos aninhados `FORM > DIV > P` com um manipulador em cada um:
```html run autorun