mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
🐛 Fixed inability to create multi-word tags via post settings menu
closes https://github.com/TryGhost/Ghost/issues/9357 - detect space key being pressed and ignore in the token input's custom `selectOrCreate` action
This commit is contained in:
parent
dafbe4d0a2
commit
beeb486132
1 changed files with 7 additions and 1 deletions
|
@ -133,7 +133,13 @@ export default Component.extend({
|
|||
return newOptions;
|
||||
}),
|
||||
|
||||
selectOrCreate(selection, select) {
|
||||
selectOrCreate(selection, select, keyboardEvent) {
|
||||
// allow tokens to be created with spaces
|
||||
if (keyboardEvent && keyboardEvent.code === 'Space') {
|
||||
select.actions.search(`${select.searchText} `);
|
||||
return;
|
||||
}
|
||||
|
||||
let suggestion = selection.find((option) => {
|
||||
return option.__isSuggestion__;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue