File tree 5 files changed +13
-12
lines changed
5 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 12
12
13
13
* Quick fix for error in visible check ([ Issue #484 ] ( https://github.com/swisnl/jQuery-contextMenu/issues/484 ) )
14
14
15
+ ####
16
+
17
+ * Tweaked positioning of submenu ([ Issue #387 ] ( https://github.com/swisnl/jQuery-contextMenu/issues/387 ) )
15
18
16
19
### 2.4.0 ###
17
20
Original file line number Diff line number Diff line change 12
12
* MIT License http://www.opensource.org/licenses/mit-license
13
13
* GPL v3 http://opensource.org/licenses/GPL-3.0
14
14
*
15
- * Date: 2016-12-15T20:10:00.006Z
15
+ * Date: 2016-12-15T21:07:54.582Z
16
16
*/
17
17
18
18
( function ( factory ) {
206
206
// .position() is provided as a jQuery UI utility
207
207
// (...and it won't work on hidden elements)
208
208
$menu . css ( 'display' , 'block' ) . position ( {
209
- my : 'left top' ,
209
+ my : 'left top-5 ' ,
210
210
at : 'right top' ,
211
211
of : this ,
212
212
collision : 'flipfit fit'
213
213
} ) . css ( 'display' , '' ) ;
214
214
} else {
215
215
// determine contextMenu position
216
216
var offset = {
217
- top : 0 ,
218
- left : this . outerWidth ( )
217
+ top : - 9 ,
218
+ left : this . outerWidth ( ) - 5
219
219
} ;
220
220
$menu . css ( offset ) ;
221
221
}
1540
1540
1541
1541
// manage contextMenu instances
1542
1542
$ . contextMenu = function ( operation , options ) {
1543
-
1544
1543
if ( typeof operation !== 'string' ) {
1545
1544
options = operation ;
1546
1545
operation = 'create' ;
Original file line number Diff line number Diff line change 206
206
// .position() is provided as a jQuery UI utility
207
207
// (...and it won't work on hidden elements)
208
208
$menu . css ( 'display' , 'block' ) . position ( {
209
- my : 'left top' ,
209
+ my : 'left top-5 ' ,
210
210
at : 'right top' ,
211
211
of : this ,
212
212
collision : 'flipfit fit'
213
213
} ) . css ( 'display' , '' ) ;
214
214
} else {
215
215
// determine contextMenu position
216
216
var offset = {
217
- top : 0 ,
218
- left : this . outerWidth ( )
217
+ top : - 9 ,
218
+ left : this . outerWidth ( ) - 5
219
219
} ;
220
220
$menu . css ( offset ) ;
221
221
}
1540
1540
1541
1541
// manage contextMenu instances
1542
1542
$ . contextMenu = function ( operation , options ) {
1543
-
1544
1543
if ( typeof operation !== 'string' ) {
1545
1544
options = operation ;
1546
1545
operation = 'create' ;
You can’t perform that action at this time.
0 commit comments