[FIX] web: dialogs with shouldFocusButtons option have the focus set.
Before this fix, sometimes dialogs that had the option shouldFocusButtons set on open did not set the focus on the buttons. This is especially true for the "discard changes" dialog where it is less usable with the keyboard. After this fix, we wait for the widget to append itself to the dom before setting the focus.
This commit is contained in:
@@ -182,10 +182,10 @@ var Dialog = Widget.extend({
|
||||
self.$modal.removeAttr("aria-hidden");
|
||||
self.$modal.modal('show');
|
||||
self._opened.resolve();
|
||||
if (options && options.shouldFocusButtons) {
|
||||
self._onFocusControlButton();
|
||||
}
|
||||
});
|
||||
if (options && options.shouldFocusButtons) {
|
||||
self._onFocusControlButton();
|
||||
}
|
||||
|
||||
return self;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user