mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 02:09:54 +08:00
UX: Clicking on a button in sidebar on mobile should collapse it (#18305)
This commit is contained in:
parent
4e1b9a225e
commit
04cdc2910d
|
@ -392,6 +392,15 @@ createWidget("revamped-hamburger-menu-wrapper", {
|
|||
];
|
||||
},
|
||||
|
||||
click(event) {
|
||||
if (
|
||||
event.target.closest(".sidebar-section-header-button") ||
|
||||
event.target.closest(".sidebar-section-link")
|
||||
) {
|
||||
this.sendWidgetAction("toggleHamburger");
|
||||
}
|
||||
},
|
||||
|
||||
clickOutside() {
|
||||
this.sendWidgetAction("toggleHamburger");
|
||||
},
|
||||
|
|
|
@ -40,7 +40,7 @@ acceptance("Sidebar - Mobile - User with sidebar enabled", function (needs) {
|
|||
await visit("/");
|
||||
|
||||
await click(".hamburger-dropdown");
|
||||
await click(".sidebar-section-link-tracked");
|
||||
await click(".sidebar-section-community .sidebar-section-header-button");
|
||||
|
||||
assert.ok(
|
||||
!exists(".sidebar-hamburger-dropdown"),
|
||||
|
|
Loading…
Reference in New Issue
Block a user