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:
Sam Smith 2017-04-20 16:30:54 +01:00
parent 68ed611b47
commit 5c5872d31f
3 changed files with 3 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View file

@ -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 {