mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Confirmation dialog: Make keyboard-accessible: escape to cancel
And proper tab order. Then some more work to re-focus on the message composition field after the dialog shows up and steals focus. FREEBIE
This commit is contained in:
@@ -689,10 +689,12 @@
|
||||
this.checkUnverifiedSendMessage(e, {force: true});
|
||||
}.bind(this),
|
||||
reject: function() {
|
||||
// do nothing
|
||||
}
|
||||
this.focusMessageField();
|
||||
}.bind(this)
|
||||
});
|
||||
|
||||
this.$el.prepend(dialog.el);
|
||||
dialog.focusCancel();
|
||||
},
|
||||
|
||||
checkUnverifiedSendMessage: function(e, options) {
|
||||
@@ -750,6 +752,8 @@
|
||||
var message = this.replace_colons(input.val()).trim();
|
||||
var convo = this.model;
|
||||
|
||||
this.focusMessageField();
|
||||
|
||||
if (message.length > 0 || this.fileInput.hasFiles()) {
|
||||
this.fileInput.getFiles().then(function(attachments) {
|
||||
convo.sendMessage(message, attachments);
|
||||
|
||||
Reference in New Issue
Block a user