Skip to content
This repository has been archived by the owner on Apr 22, 2018. It is now read-only.

Commit

Permalink
Close (remove) any menus before building and showing a new one.
Browse files Browse the repository at this point in the history
After the removal of the backdrop div, clicking two different basicContext-enabled elements would show the same menu on the second click. This fixes that behavior by always removing any menu before creating one.
  • Loading branch information
cossssmin committed Oct 25, 2016
1 parent eb57e84 commit 3376994
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/basicContext.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/scripts/basicContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ const bind = function(item = {}) {

const show = function(items, e, fnClose, fnCallback) {

// Close any other open context menus
close()

// Build context
let html = build(items)

Expand Down

0 comments on commit 3376994

Please sign in to comment.