[w3c/uievents] Different click event order behavior between Firefox , ie , edge and Chrome/Safari (#303)

Hi,I found the different behavior when I click the target element witch I bound click events each notUseCapture and useCapture in different browser.

**Steps to reproduce**
```
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #a {
            width: 100%;
            height: 300px;
            background-color: lightblue;
        }
    </style>
</head>
<body>
    <div id="a">    </div>
</body>
<script>
    var a = document.getElementById("a");
    a.addEventListener('click', function() {  console.log('a');  },false);
    a.addEventListener('click', function() {  console.log('a1');  }, true);
</script>
</html>
```
**Results**
Chrome / Safari:
```
a1
a
```
Firefox / IE / Edge:
```
a
a1
```

according to the spec [https://w3c.github.io/uievents/#event-flow](https://w3c.github.io/uievents/#event-flow)

> The capture phase: The event object propagates through the target’s ancestors from the Window to the target’s parent. This phase is also known as the capturing phase.

> The target phase: The event object arrives at the event object’s event target. This phase is also known as the at-target phase. If the event type indicates that the event doesn’t bubble, then the event object will halt after completion of this phase.

> The bubble phase: The event object propagates through the target’s ancestors in reverse order, starting with the target’s parent and ending with the Window. This phase is also known as the bubbling phase.

When I click the target element , it should be at-target phrase and trigger by listener order, but Chrome / Safari doesn`t .
So, what`s going on ?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/303

Received on Monday, 29 March 2021 02:58:14 UTC