[Rt-commit] rt branch, 5.0/fix-mobile-home-nav, created. rt-5.0.0beta2-1-g1ad7b721a1

Blaine Motsinger blaine at bestpractical.com
Tue Jun 16 18:43:26 EDT 2020


The branch, 5.0/fix-mobile-home-nav has been created
        at  1ad7b721a1c003c50e639218a2150984c92dd263 (commit)

- Log -----------------------------------------------------------------
commit 1ad7b721a1c003c50e639218a2150984c92dd263
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Tue Jun 16 17:38:45 2020 -0500

    Fix mobile home navigation for iOS
    
    On iPhone, when the main navigation is collapsed into More,
    clicking the Home "a" link with the sub menu expanded isn't going
    back to Home. To fix it we removed the iOS specific logic which was
    intentionally not clearing and setting timeout. Following the git
    blame history for superfish didn't explain why the timeout reset
    was being skipped for iOS.
    
    Since it appears superfish is no longer being maintained, this
    commit fixes the problem until the bug is fixed in upstream, or if
    comment from the author indicates a different cause or better fix.

diff --git a/devel/third-party/superfish.js b/devel/third-party/superfish.js
index 2503662c36..3b9431993f 100644
--- a/devel/third-party/superfish.js
+++ b/devel/third-party/superfish.js
@@ -89,13 +89,23 @@
 			out = function () {
 				var $this = $(this),
 					o = getOptions($this);
-				if (ios) {
-					$.proxy(close, $this, o)();
-				}
-				else {
-					clearTimeout(o.sfTimer);
-					o.sfTimer = setTimeout($.proxy(close, $this, o), o.delay);
-				}
+
+                                // (BPS) On iPhone, when the main navigation is collapsed
+                                // into More, clicking the Home "a" link with the sub menu
+                                // expanded isn't going back to Home.
+                                // To fix it we removed the iOS specific logic which was
+                                // intentionally not clearing and setting timeout.
+                                // Following the git blame history for superfish didn't
+                                // explain why the timeout reset was being skipped for iOS.
+                                // https://github.com/joeldbirch/superfish/commit/112f237
+
+                                // Since it appears superfish is no longer being maintained,
+                                // this edit fixes the problem until the bug is fixed in
+                                // upstream, or if comment from the author indicates a 
+                                // different cause or better fix.
+                                // https://github.com/joeldbirch/superfish/issues/182
+				clearTimeout(o.sfTimer);
+				o.sfTimer = setTimeout($.proxy(close, $this, o), o.delay);
 			},
 			touchHandler = function (e) {
 				var $this = $(this),

-----------------------------------------------------------------------


More information about the rt-commit mailing list