-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before this, the menu were closed by a listener on the `onClick` of window. This caused 2 main problems : - on some places, we stopped the event propagation, which prevented the menu from closing. This was the case for the topbar composer for example. - on buttons that opened a menu we needed to add a `.stop`, because if another menu was already open the menu would instantly close after changing its props. Solved this by having the externalListener of menus listen to the `capture` phase of events. This bypass all the `.stop`, and assures that the old menu is closed before the new one is opened for click events. The way it is currently handled should probably be improved when we implement a proper menu service (`querySelectorAll` on the menus and we need to customize event payload for menu toggle to work). Odoo task 3145756 closes #2038 X-original-commit: 3354055 Signed-off-by: Rémi Rahir (rar) <rar@odoo.com> Signed-off-by: Minne Adrien (adrm) <adrm@odoo.com> Co-authored-by: jash <jash@odoo.com>
- Loading branch information
1 parent
29fa62c
commit d466315
Showing
9 changed files
with
67 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters