From 8ba06fc545b6e861fee2d8a87c06a206e5f7b0c5 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Tue, 18 Feb 2014 09:01:59 +0800 Subject: [PATCH] Bug fix: When cursor pass #full_name_layer with a high speed, #full_name_layer will resides in page Now it'll disappear. Signed-off-by: Edward Cheng --- js/navigation.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/js/navigation.js b/js/navigation.js index a0ee220b92..742cb2f1db 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -1223,13 +1223,23 @@ function PMA_showFullName($containerELem) { $('body').append('
'); $('#full_name_layer').mouseleave(function() { /** mouseleave */ - $(this).addClass('hide'); + $(this).addClass('hide') + .removeClass('hovering'); + }).mouseenter(function() { + /** mouseenter */ + $(this).addClass('hovering'); }); $fullNameLayer = $('#full_name_layer'); } $fullNameLayer.removeClass('hide'); $fullNameLayer.css({left: thisOffset.left, top: thisOffset.top}); $fullNameLayer.html($this.clone()); + setTimeout(function() { + if(! $fullNameLayer.hasClass('hovering')) + { + $fullNameLayer.trigger('mouseleave'); + } + }, 200); } }); } \ No newline at end of file