Skip to content

Instantly share code, notes, and snippets.

@csavoronin csavoronin/24865.patch Secret
Last active Oct 23, 2019

Embed
What would you like to do?
[!] Design: Responsive: Menu: On iOS 13, the second level menu did not work. Fixed.
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
You can’t perform that action at this time.