[FIX] website: leave 'create screen' when click outside
The purpose of this commit is to hide the Create menu when the user click on
any area other than the link icons.
Note: It was already the case in V10.0 since the options were inside a modal.
Natively bootstrap would close the modal when clicking outside of it.
We lost that behavior while refactoring in V11.0 with 297297696 that
replaced the modal by a pseudo-dropdown
opw-1860196
Closes #25389
This commit is contained in:
committed by
Romain Derie
parent
ab5fcb2965
commit
26d384ef61
@@ -14,7 +14,7 @@ var NewContentMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
|
||||
new_page: '_createNewPage',
|
||||
}),
|
||||
events: _.extend({}, websiteNavbarData.WebsiteNavbarActionWidget.prototype.events || {}, {
|
||||
'click > a': '_onMenuToggleClick',
|
||||
'click > a, #o_new_content_menu_choices': '_onMenuToggleClick',
|
||||
}),
|
||||
|
||||
/**
|
||||
@@ -65,6 +65,7 @@ var NewContentMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
|
||||
|
||||
/**
|
||||
* Called when the menu's toggle button is clicked -> Opens the menu.
|
||||
* Or when there is a click outside the menu's options -> Closes the menu
|
||||
*
|
||||
* @private
|
||||
* @param {Event} ev
|
||||
|
||||
Reference in New Issue
Block a user