mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Koenig - Fixed backspace not removing card after inserting Unsplash image
refs https://github.com/TryGhost/Ghost/issues/9724 - focus was not being returned to the editor after the Unsplash modal was closed so although the image card looked selected the editor was not responding to any key commands
This commit is contained in:
parent
c33a0c23bc
commit
cb7a038b08
1 changed files with 8 additions and 2 deletions
|
@ -182,9 +182,11 @@ export default Component.extend({
|
||||||
|
|
||||||
selectFromImageSelector({src, caption, alt}) {
|
selectFromImageSelector({src, caption, alt}) {
|
||||||
let {payload, saveCard} = this;
|
let {payload, saveCard} = this;
|
||||||
let imageSelector, searchTerm;
|
let searchTerm;
|
||||||
|
|
||||||
setProperties(payload, {src, caption, alt, imageSelector, searchTerm});
|
setProperties(payload, {src, caption, alt, searchTerm});
|
||||||
|
|
||||||
|
this.send('closeImageSelector');
|
||||||
|
|
||||||
saveCard(payload, false);
|
saveCard(payload, false);
|
||||||
},
|
},
|
||||||
|
@ -195,6 +197,10 @@ export default Component.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
set(this.payload, 'imageSelector', undefined);
|
set(this.payload, 'imageSelector', undefined);
|
||||||
|
|
||||||
|
// ensure focus is returned to the editor so that the card which
|
||||||
|
// appears selected behaves as if it's selected
|
||||||
|
this.editor.focus();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue