🐛 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
e64dc48d54
commit
bdab644ad5
@ -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 New Issue
Block a user