File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed 
javascripts/discourse/widgets Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ createWidget('custom-header-dropdown', {
2424 } , 
2525
2626 click ( )  { 
27+  if  ( this . site . mobileView )  { 
28+  this . sendWidgetAction ( "showHeaderLinks" ) ;  // in mobile view, close menu on click 
29+  } 
2730 DiscourseURL . routeTo ( this . attrs . url ) ; 
2831 } , 
2932} ) ; 
Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ createWidget("custom-header-link", {
109109 } , 
110110
111111 click ( )  { 
112+  if  ( this . site . mobileView )  { 
113+  this . sendWidgetAction ( "showHeaderLinks" ) ;  // in mobile view, close menu on click 
114+  } 
112115 DiscourseURL . routeTo ( this . attrs . url ) ; 
113116 } , 
114117} ) ; 
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ createWidget('custom-header-links', {
5656 {{attach 
5757 widget="custom-header-link" 
5858 attrs=item 
59+  showHeaderLinks="showHeaderLinks" 
5960 }} 
6061 {{/each}} 
6162 </ul> 
                         You can’t perform that action at this time. 
           
                  
0 commit comments