mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
Don't occlude link when preview is above mouse
When the user dwells on a link and there's enough room to display a preview above it, then the preview should rest atop the link rather than above the mouse. Bug: T161366 Change-Id: Ia7266f6e5c272817581bdbcb3710429b266556e4
This commit is contained in:
parent
68ed611b47
commit
5c5872d31f
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map
vendored
BIN
resources/dist/index.js.map
vendored
Binary file not shown.
|
@ -508,7 +508,7 @@ function createLayout( preview, event ) {
|
|||
// Mirror the positioning of the preview when there's no "Y flip": rest
|
||||
// the pokey on the edge of the link's bounding rectangle. In this case
|
||||
// the edge is the top-most.
|
||||
offsetTop = link.offset().top - SIZES.pokeySize;
|
||||
offsetTop = link.offset().top;
|
||||
|
||||
// Change the Y position to the top of the link
|
||||
if ( event.pageY ) {
|
||||
|
@ -520,6 +520,8 @@ function createLayout( preview, event ) {
|
|||
true
|
||||
) + $window.scrollTop();
|
||||
}
|
||||
|
||||
offsetTop -= SIZES.pokeySize;
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue