Fix focus issues with identity key send view

Tabbing right after entering the view would cause everythign to go crazy
as focus went back to the pane you were just on. This change both sets
the proper focus on load of that view (on the cancel button) and hides
other panes when they aren't active, only making them visible again when
they are once again the 'top' pane.

FREEBIE
pull/749/head
Scott Nonnenberg 8 years ago
parent ff4fde651c
commit 7ab20f09cc

@ -638,6 +638,9 @@
listenBack: function(view) {
this.panels = this.panels || [];
if (this.panels.length > 0) {
this.panels[0].$el.hide();
}
this.panels.unshift(view);
if (this.panels.length === 1) {
@ -649,6 +652,9 @@
},
resetPanel: function() {
var view = this.panels.shift();
if (this.panels.length > 0) {
this.panels[0].$el.show();
}
view.remove();
if (this.panels.length === 0) {

@ -38,9 +38,10 @@
this.listenTo(view, 'send-anyway', this.onSendAnyway);
view.render();
this.listenBack(view);
view.$('.cancel').focus();
}
// TODO: is there anything we might want to do here? Pop a confirmation dialog? Ideally it would always have error-specific help.
},
forceSend: function() {
this.model.updateVerified().then(function() {

Loading…
Cancel
Save