mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Set focus properly in confirmation dialogs when in mouse mode
This commit is contained in:
@@ -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();
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user