0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

🐛 Fixed tag/author removal in post settings removing multiple tags/authors

closes https://github.com/TryGhost/Ghost/issues/9575
- in 6a3cfc2ca8 an `onmouseover` event handler was added for the close button in token input options which resulted in double firing in some circumstances where our code fired then the ember-power-select removal event handler also fired
This commit is contained in:
Kevin Ansfield 2018-04-23 14:25:59 +01:00
parent f11cb2e491
commit 5de0ae5cea
2 changed files with 5 additions and 4 deletions

View file

@ -12,9 +12,11 @@ export default EmberPowerSelectMultipleTrigger.extend({
}, },
handleOptionMouseDown(event) { handleOptionMouseDown(event) {
let action = this.get('extra.optionMouseDown'); if (!event.target.closest('[data-selected-index]')) {
if (action) { let action = this.get('extra.optionMouseDown');
return action(event); if (action) {
return action(event);
}
} }
}, },

View file

@ -27,7 +27,6 @@
aria-label="remove element" aria-label="remove element"
class="ember-power-select-multiple-remove-btn" class="ember-power-select-multiple-remove-btn"
data-selected-index={{idx}} data-selected-index={{idx}}
onmousedown={{action "chooseOption" opt}}
> >
{{svg-jar "close" data-selected-index=idx}} {{svg-jar "close" data-selected-index=idx}}
</span> </span>