File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 268268 if ( ( e . data . trigger !== 'right' && e . data . trigger !== 'demand' ) && e . originalEvent ) {
269269 return ;
270270 }
271-
271+
272272 // Let the current contextmenu decide if it should show or not based on its own trigger settings
273273 if ( e . mouseButton !== undefined && e . data ) {
274274 if ( ! ( e . data . trigger == 'left' && e . mouseButton === 0 ) && ! ( e . data . trigger == 'right' && e . mouseButton === 2 ) ) {
897897
898898 // make sure we're in front
899899 if ( opt . zIndex ) {
900- css . zIndex = zindex ( $trigger ) + opt . zIndex ;
900+ var additionalZValue = opt . zIndex ;
901+ // If opt.zIndex is a function, call the function to get the right zIndex.
902+ if ( typeof opt . zIndex === "function" ) {
903+ additionalZValue = opt . zIndex . call ( this ) ;
904+ }
905+ css . zIndex = zindex ( $trigger ) + additionalZValue ;
901906 }
902907
903908 // add layer
You can’t perform that action at this time.
0 commit comments