Skip to content

Instantly share code, notes, and snippets.

@csavoronin
Last active October 23, 2019 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csavoronin/6de21eb6894efdd26e2c559e5a6291f4 to your computer and use it in GitHub Desktop.
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.
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