Templarian / ui.bootstrap.contextMenu

AngularJS Bootstrap UI Context Menu
MIT License
259 stars 127 forks source link

Context menu is not closed on click outside menu #84

Closed prikryl closed 8 years ago

prikryl commented 8 years ago

fix: contextmenu.js

       function removeAllContextMenus(e) {
            if ($(e.target).hasClass("dropdown")) { // menu is not closed of clicked outside contextmenu- bug in original sources
                removeContextMenus();
                return;
            }
             if (!$(e.target).closest('.dropdown').length) {
                removeContextMenus();
            }
        }
josetaira commented 8 years ago

Weird. This used to work on a previous version. Probably one of the recent "fixes" and changes broke this. I'm working on it.

josetaira commented 8 years ago

"closest" is not available in jQLite. The change in https://github.com/Templarian/ui.bootstrap.contextMenu/pull/63 broke this. We should make sure that changes coming into this repo do not have any jQuery-only code.

Should be available in the next build in bower and npm. @Templarian for your action

Templarian commented 8 years ago

@josetaira v0.9.9 released. Eventually I guess I'll have to make this a v1.0.0 release.