Set focus properly in confirmation dialogs when in mouse mode
This commit is contained in:
parent
526f12bb45
commit
5f58be1a29
4 changed files with 11 additions and 10 deletions
|
@ -70,7 +70,9 @@
|
|||
}
|
||||
},
|
||||
focusCancel() {
|
||||
this.$('.cancel').focus();
|
||||
// We delay this call because we might be called inside click handlers
|
||||
// which would set focus to themselves afterwards!
|
||||
setTimeout(() => this.$('.cancel').focus(), 1);
|
||||
},
|
||||
});
|
||||
})();
|
||||
|
|
|
@ -1850,9 +1850,7 @@
|
|||
const contact = ConversationController.get(contactId);
|
||||
const message = this.model.messageCollection.get(messageId);
|
||||
if (!message) {
|
||||
throw new Error(
|
||||
`deleteMessage: Did not find message for id ${messageId}`
|
||||
);
|
||||
throw new Error(`forceSend: Did not find message for id ${messageId}`);
|
||||
}
|
||||
|
||||
const dialog = new Whisper.ConfirmationDialogView({
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
reject,
|
||||
});
|
||||
this.$el.append(dialog.el);
|
||||
dialog.focusCancel();
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue