Skip to content

Commit

Permalink
We need to change focus to last active element in case of "clearDialog"
Browse files Browse the repository at this point in the history
Problem:
    - in case of submenu (for example in Calc there is a conditional format menu )
    - when we open submenu it and then press ESC it changes focus back to document
    - and the main parent menu stays open without focus

Solution: - call LastElement focus before Clear dialog so it works as expected (MSO does the same)
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ic8fa988f3a8854a99c44d0fde5a7dec32e398739
  • Loading branch information
Darshan-upadhyay1110 committed Nov 6, 2024
1 parent b8133c9 commit 4012ddd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions browser/src/control/Control.JSDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ L.Control.JSDialog = L.Control.extend({
console.warn('closePopover: no builder');
}
else {
// Need to change focus to last element before we clear the current dialog
this.focusToLastElement(id);
this.clearDialog(id);
return;
}

this.focusToLastElement(id);
Expand Down

0 comments on commit 4012ddd

Please sign in to comment.