Skip to content

Commit bbe9433

Browse files
authored
fix when add layer cause page forced reflow
see [#721](#721)
1 parent 0dc5897 commit bbe9433

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jquery.contextMenu.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,15 +1505,15 @@
15051505
width: $win.width(),
15061506
display: 'block',
15071507
position: 'fixed',
1508-
'z-index': zIndex,
1508+
'z-index': zIndex - 1,
15091509
top: 0,
15101510
left: 0,
15111511
opacity: 0,
15121512
filter: 'alpha(opacity=0)',
15131513
'background-color': '#000'
15141514
})
15151515
.data('contextMenuRoot', opt)
1516-
.insertBefore(this)
1516+
.appendTo(document.body)
15171517
.on('contextmenu', handle.abortevent)
15181518
.on('mousedown', handle.layerClick);
15191519

0 commit comments

Comments
 (0)