This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fixed Ctrl/Cmd+S triggering browser save when tags or authors input…
… has focus (#1707) closes TryGhost/Ghost#11786 `GhTokenInput` uses `PowerSelect` component of `ember-power-select` internally in `app/components/gh-token-input/select-multiple`. When you open that component, [you can find](https://github.com/cibernox/ember-power-select/blob/d36f38f39eba6a0afad6fd23821d20c06a9a42ef/addon/components/power-select.ts#L262-L278) that it calls `stopImmediatePropagation` when ctrl/cmd or meta key is down. ```js handleTriggerKeydown(e: KeyboardEvent) { if (this.args.onKeydown && this.args.onKeydown(this.storedAPI, e) === false) { e.stopImmediatePropagation(); return; } if (e.ctrlKey || e.metaKey) { e.stopImmediatePropagation(); return; } if ((e.keyCode >= 48 && e.keyCode <= 90) || isNumpadKeyEvent(e)) { // Keys 0-9, a-z or numpad keys (this.triggerTypingTask as unknown as Performable).perform(e); } else if (e.keyCode === 32) { // Space this._handleKeySpace(this.storedAPI, e); } else { return this._routeKeydown(this.storedAPI, e); } } ``` Because of that, I had to dispatch event directly to the root of the Ghost admin app.
- Loading branch information