[Rt-commit] rt branch 5.0/fix-submenu-drift updated. rt-5.0.2-259-g559d79cc9b
BPS Git Server
git at git.bestpractical.com
Wed Jun 8 21:38:34 UTC 2022
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/fix-submenu-drift has been updated
via 559d79cc9b38642b5f4a12325c34fe59d8f2542e (commit)
from 6bbcd0b847df52dceec6abf55fe24b60c6fcb97d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 559d79cc9b38642b5f4a12325c34fe59d8f2542e
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Jun 9 05:21:26 2022 +0800
Fix the flash issue when clicking submenus
On some browsers like Chrome, the submenu could be flashed out if we set
display to "none" right before re-rendering it, when it was shown
already.
This commit fixes the issue by setting it back to its original display,
which is more robost from all aspects.
diff --git a/share/static/js/jquery.supposition.js b/share/static/js/jquery.supposition.js
index 834db44904..367395c84c 100644
--- a/share/static/js/jquery.supposition.js
+++ b/share/static/js/jquery.supposition.js
@@ -33,6 +33,7 @@
onBeforeShow = function(){
this.each(function(){
var $u = $(this);
+ var old_display = $u.css('display');
$u.css('display','block');
var deviation = 0.1; // make following conditions more tolerant to get rid of the precision issue.
@@ -53,7 +54,7 @@
if (expandUp) {
$u.css('margin-top',baseline - (menuHeight + offsetTop));
}
- $u.css('display','none');
+ $u.css('display', old_display);
});
};
-----------------------------------------------------------------------
Summary of changes:
share/static/js/jquery.supposition.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
hooks/post-receive
--
rt
More information about the rt-commit
mailing list