1
0
Fork 0
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:
Kevin Ansfield 2018-01-02 13:54:02 +00:00
parent dafbe4d0a2
commit beeb486132

View file

@ -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__;
});