File tree 1 file changed +21
-21
lines changed
1 file changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -890,28 +890,28 @@ var // currently active contextMenu trigger
890
890
//$(document).off('.contextMenuAutoHide keydown.contextMenu'); // http://bugs.jquery.com/ticket/10705
891
891
$ ( document ) . off ( '.contextMenuAutoHide' ) . off ( 'keydown.contextMenu' ) ;
892
892
// hide menu
893
- opt . $menu && opt . $menu [ opt . animation . hide ] ( opt . animation . duration ) ;
894
-
895
- // tear down dynamically built menu
896
- if ( opt . build ) {
897
- opt . $menu . remove ( ) ;
898
- $ . each ( opt , function ( key , value ) {
899
- switch ( key ) {
900
- case 'ns' :
901
- case 'selector' :
902
- case 'build' :
903
- case 'trigger' :
904
- return true ;
893
+ opt . $menu && opt . $menu [ opt . animation . hide ] ( opt . animation . duration , function ( ) {
894
+ // tear down dynamically built menu after animation is completed.
895
+ if ( opt . build ) {
896
+ opt . $menu . remove ( ) ;
897
+ $ . each ( opt , function ( key , value ) {
898
+ switch ( key ) {
899
+ case 'ns' :
900
+ case 'selector' :
901
+ case 'build' :
902
+ case 'trigger' :
903
+ return true ;
905
904
906
- default :
907
- opt [ key ] = undefined ;
908
- try {
909
- delete opt [ key ] ;
910
- } catch ( e ) { }
911
- return true ;
912
- }
913
- } ) ;
914
- }
905
+ default :
906
+ opt [ key ] = undefined ;
907
+ try {
908
+ delete opt [ key ] ;
909
+ } catch ( e ) { }
910
+ return true ;
911
+ }
912
+ } ) ;
913
+ }
914
+ } ) ;
915
915
} ,
916
916
create : function ( opt , root ) {
917
917
if ( root === undefined ) {
You can’t perform that action at this time.
0 commit comments