[Bug] Event handler changes flush before all handlers have run
Open
Has Reproduction
- Dominant language
- TypeScript
- Stars
- 22.6k
- Forks
- 4.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 15
Description
### 🐞 Describe the Bug
Event handlers flush changes immediately in the microtask queue. This means that if multiple event handlers are added to a single element, then it is possible for the first event handler to modify state in the Ember app which then leads to the second handler not firing.
### 🔬 Minimal Reproduction
```hbs
Close
```
### 😕 Actual Behavior
Only the first event handler triggers before the element is removed
### 🤔 Expected Behavior
Both event handlers should trigger before the element is removed
### 🌍 Environment
- Ember: 3.24.0
- Node.js/npm: N/A
- OS: N/A
- Browser: Chrome
Contributor guide
Assessment
This issue has not been assessed yet.