Skip to content

Conversation

@wizard04wsu
Copy link

The menu wasn't closing when clicking outside of it. Also, it shouldn't remove all click handlers from the body.

@kcockerill
Copy link

It should allow removal of it's own click handler:

Index: jquery.dlmenu.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8

--- jquery.dlmenu.js (revision c213da44d821bce9475bee48d1b159eb8c064203)
+++ jquery.dlmenu.js (date 1543938663876)
@@ -195,11 +195,11 @@
},
_openMenu : function() {
var self = this;

  •   	// clicking somewhere else makes the menu close
    
  •   	$body.off( 'click' ).on( 'click.dlmenu', function() {
    
  •   		self._closeMenu() ;
    
  •   	} );
    
  •   	this.$menu.addClass( 'dl-menuopen dl-menu-toggle' ).on( this.transEndEventName, function() {
    
  •        // clicking somewhere else makes the menu close
    
  •        $body.off( 'click.dlmenu' ).on( 'click.dlmenu', function() {
    
  •            self._closeMenu() ;
    
  •        } );
    
  •        this.$menu.addClass( 'dl-menuopen dl-menu-toggle' ).on( this.transEndEventName, function() {
      		$( this ).removeClass( 'dl-menu-toggle' );
      	} );
      	this.$trigger.addClass( 'dl-active' );
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants