Skip to content

Commit d943c5a

Browse files
committed
'replaceMenu' in beforeOpen causing select: to lose ui.target
Closed mar10#58
1 parent 1383041 commit d943c5a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 1.4.0 / Unreleased
2+
[BUGFIX] #58: 'replaceMenu' in beforeOpen causing select: to lose ui.target
23

34
# 1.3.0 / 2014-03-09
45

jquery.ui-contextmenu.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@
101101
},
102102
/** (Re)Create jQuery UI Menu. */
103103
_createUiMenu: function(menuDef){
104+
var ct;
104105
// Remove temporary <ul> if any
105106
if(this.isOpen()){
107+
ct = this.currentTarget; // #58: 'replaceMenu' in beforeOpen causing select: to lose ui.target
106108
// close without animation, to force async mode
107109
this._closeMenu(true);
110+
this.currentTarget = ct;
108111
}
109112

110113
if(this.menuIsTemp){

jquery.ui-contextmenu.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)