mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Koenig - Fixed /-menu Enter
card creation
refs https://github.com/TryGhost/Ghost/issues/9724
- eb865f841f
introduced a bug because it expected an event param that is only available when clicking
- add guard to check for `event` presence before attempting to stop propagation
This commit is contained in:
parent
57427ba5be
commit
075037cadb
1 changed files with 4 additions and 2 deletions
|
@ -96,8 +96,10 @@ export default Component.extend({
|
|||
// make sure the click doesn't propagate and get picked up by the
|
||||
// newly inserted card which can then remove itself because it
|
||||
// looks like a click outside of an empty card
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
|
||||
// params are order-dependent and listed in CARD_MENU for each card
|
||||
if (!isEmpty(item.params) && !isEmpty(params)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue