FIX: stops bookmark keybaod event to be propagated into modal (#9457)
This commit is contained in:
parent
8f0544137a
commit
17c0c9652d
|
@ -1,6 +1,5 @@
|
|||
import { and } from "@ember/object/computed";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import { next } from "@ember/runloop";
|
||||
import Controller from "@ember/controller";
|
||||
import { Promise } from "rsvp";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
|
@ -77,10 +76,6 @@ export default Controller.extend(ModalFunctionality, {
|
|||
|
||||
if (this.editingExistingBookmark()) {
|
||||
this.initializeExistingBookmarkData();
|
||||
} else {
|
||||
// make sure the input is cleared, otherwise the keyboard shortcut to toggle
|
||||
// bookmark for post ends up in the input
|
||||
next(() => this.set("model.name", null));
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -174,7 +174,10 @@ export default {
|
|||
this.pause(Object.keys(combinations));
|
||||
},
|
||||
|
||||
toggleBookmark() {
|
||||
toggleBookmark(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
this.sendToSelectedPost("toggleBookmark");
|
||||
this.sendToTopicListItemView("toggleBookmark");
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue