0
Fork 0
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:
Kevin Ansfield 2018-08-11 18:30:59 +01:00
parent c33a0c23bc
commit cb7a038b08

View file

@ -182,9 +182,11 @@ export default Component.extend({
selectFromImageSelector({src, caption, alt}) {
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);
},
@ -195,6 +197,10 @@ export default Component.extend({
}
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();
}
},