Thank you for reporting this bug. We will make it our priority to review this report.
-
Modern: floated components need focusOnToFront config which should default to true
So they should always focus when moved to the front - which happens on show.
Ext.Dialog erroneously has
Code:
afterShow: function () {
this.callParent();
if (this.getModal()) {
this.focus();
}
}
To sort of handle it. But the modal test is bogus. That method should be removed.
A floated component moving to the top of the stack should always take focus unless the developer actively requests otherwise by setting focusOnToFront: false. This is how Classic does it, and that handles focus management well.
-
On the same note, a pointer focus gesture, (mousedown for mouse gestures, or tap for touch gestures) should check if the gesture is inside a floating component.
If so, then if the target element is focusable, then return and allow the event to do its default.
If the target is *not* focusable proceed as below:
*If* the floating component does not *contain focus*, then the floating component should be focused (allowing its *defaultFocus* config to delegate focus to a descendant).
If the floating component *does* contain focus, the gesture should be preventDefaulted so that focus does not disappear to document.body, triggering a focusleave, and causing Dialogs to hide.
Is this understood?