-
-
Save csavoronin/6de21eb6894efdd26e2c559e5a6291f4 to your computer and use it in GitHub Desktop.
[!] Design: Responsive: Menu: On iOS 13, the second level menu did not work. Fixed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/js/tygh/responsive.js b/js/tygh/responsive.js | |
index 8336fe195e..fc12f34a8b 100644 | |
--- a/js/tygh/responsive.js | |
+++ b/js/tygh/responsive.js | |
@@ -196,12 +196,14 @@ | |
* @param {jQueryHTMLElement} $submenu | |
*/ | |
function _getSubmenuOriginWidth ($submenu) { | |
- $submenu.css({ visibility: 'hidden', left: 0 }); | |
- var _width = $submenu.outerWidth() || 0; | |
+ // FIXEME: iOS 13 bug with visibility: hidden | |
+ // $submenu.css({ visibility: 'hidden', left: 0 }); | |
+ // var _width = $submenu.outerWidth() || 0; | |
+ var _width = $submenu.position().left + $submenu.width(); | |
// remove inline styles perfectly | |
- $submenu.get(0).style.left = ''; | |
- $submenu.get(0).style.visibility = ''; | |
+ // $submenu.get(0).style.left = ''; | |
+ // $submenu.get(0).style.visibility = ''; | |
return _width; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment