Addepar / ember-widgets

https://opensource.addepar.com/ember-widgets/#/ember-widgets/overview
Other
290 stars 79 forks source link

Close popups in capture phase #284

Closed mixonic closed 5 years ago

mixonic commented 5 years ago

Popups were handling click events after the logic for the page had run. This meant sometimes you clicked on part of the page, Ember might re-render that part of the page and remove the click target, and then the closing logic here would run.

The closing logic confirms that the click target is still on the page, but as mentioned above the click target may not be.

Options here would be to remove the check for the target being on the page, or to handle closing the popovers on capture phase before other logic related to the click happens. I think that is the most appropriate solution, and so implemented it here.

mixonic commented 5 years ago

closed in favor of https://github.com/Addepar/ember-widgets/pull/285