mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
🐛 fix backspace deleting cards whilst editing (#674)
closes TryGhost/Ghost#8385 - If a card that is being edited is hard-selected then make sure that it is in fact soft-selected
This commit is contained in:
parent
e604b255af
commit
caa14da699
@ -256,6 +256,12 @@ export default Component.extend({
|
||||
throw new Error('A selection must include a cardId');
|
||||
}
|
||||
|
||||
// don't hard select an editing card.
|
||||
if (this.editedCard && this.editedCard.id === cardId) {
|
||||
this.send('editCard', cardId);
|
||||
return;
|
||||
}
|
||||
|
||||
let card = this.get('emberCards').find((card) => card.id === cardId);
|
||||
let cardHolder = $(`#${cardId}`).parents('.kg-card');
|
||||
let selectedCard = this.get('selectedCard');
|
||||
@ -369,6 +375,7 @@ export default Component.extend({
|
||||
editCard(cardId) {
|
||||
let card = this.get('emberCards').find((card) => card.id === cardId);
|
||||
this.set('editedCard', card);
|
||||
this.send('selectCard', cardId);
|
||||
},
|
||||
deleteCard(cardId, forwards = false) {
|
||||
let editor = this.get('editor');
|
||||
|
Loading…
Reference in New Issue
Block a user