diff --git a/js/navigation.js b/js/navigation.js
index a77ef48..29165da 100644
--- a/js/navigation.js
+++ b/js/navigation.js
@@ -25,26 +25,56 @@
return;
}
+ menu.setAttribute( 'aria-expanded', 'false' );
+ if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
+ menu.className += ' nav-menu';
+ }
+
button.onclick = function() {
if ( -1 !== container.className.indexOf( 'toggled' ) ) {
container.className = container.className.replace( ' toggled', '' );
jQuery('html').add('body').removeClass('mobile-menu-opened');
button.setAttribute( 'aria-expanded', 'false' );
+ menu.setAttribute( 'aria-expanded', 'false' );
} else {
container.className += ' toggled';
jQuery('html').add('body').addClass('mobile-menu-opened');
button.setAttribute( 'aria-expanded', 'true' );
+ menu.setAttribute( 'aria-expanded', 'true' );
}
};
- jQuery('#primary-nav-menu > ul').attr('role',"navigation");
- jQuery(".menu-item-has-children > a").attr({
- 'aria-label':'sub menu',
- 'aria-haspopup':'true',
- 'aria-expanded':'true'
- });
-
+ // Get all the link elements within the menu.
+ links = menu.getElementsByTagName( 'a' );
+
+ // Each time a menu link is focused or blurred, toggle focus.
+ for ( i = 0, len = links.length; i < len; i++ ) {
+ links[i].addEventListener( 'focus', toggleFocus, true );
+ links[i].addEventListener( 'blur', toggleFocus, true );
+ }
+
+ /**
+ * Sets or removes .focus class on an element.
+ */
+ function toggleFocus() {
+ var self = this;
+
+ // Move up through the ancestors of the current link until we hit .nav-menu.
+ while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
+
+ // On li elements toggle the class .focus.
+ if ( 'li' === self.tagName.toLowerCase() ) {
+ if ( -1 !== self.className.indexOf( 'focus' ) ) {
+ self.className = self.className.replace( ' focus', '' );
+ } else {
+ self.className += ' focus';
+ }
+ }
+
+ self = self.parentElement;
+ }
+ }
} )();
diff --git a/readme.txt b/readme.txt
index 963e1d0..dadc4e3 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Tags: one-column, two-columns, left-sidebar, right-sidebar, wide-blocks, accessi
Requires at least: 4.9.6
Tested up to: WordPress 5.5
Requires PHP: 5.6
-Stable tag: 1.3.8
+Stable tag: 1.3.9
YITH Proteo WordPress Theme, Copyright 2020 YITH
YITH Proteo is distributed under the terms of the GNU GPL
License: GPLv2 or later
@@ -26,6 +26,10 @@ Proteo is a sleek, modern and "Gutenberg-friendly" e-commerce theme. Developed w
== Changelog ==
+= 1.3.9 - October 15 2020 =
+* Fix sub-menu behaviour on touch devices
+* Fix double scroll on full-width pages
+
= 1.3.8 - October 14 2020 =
* New options to hide/show Categories, tags and SKU un product page
* New Single product page title management
diff --git a/sass/style.scss b/sass/style.scss
index 4338b63..a733f22 100644
--- a/sass/style.scss
+++ b/sass/style.scss
@@ -5,7 +5,7 @@ Author: YITH
Author URI: https://yithemes.com
Description: Proteo is a sleek, modern and “Gutenberg-friendly” e-commerce theme. Developed with a beautiful UI and a minimal design, is perfect for each kind of shop. Easy to manage and to customize, Proteo is the best solution if you want a complete e-commerce template and start quickly to sell your products with WooCommerce without a technical knowledge. Use it also for corporate site or a blog: there are no limits about what you can do with a beautiful and usable theme like this! Main features: Colors and Typography customization (Google font support), Logo customization, 3 different Header layouts, Advanced customizer theme options, Sidebar Management, Sidebar Chooser on each page and product, Page title icons, Top Bar Management, Easy main color shade chooser, Buttons style management (gradient buttons support), Footer management with multiple sidebars, WooCommerce support, Shop Theme Options, Custom WooCommerce messages and animated WooCommerce alert notices, Two cart page layouts, Bootstrap grid system, CSS animations, Gutenberg support, Responsive, Fullscreen search, Multilevel menus, Support to all YITH plugins, SVG icons for HiDPI screens, Translation Ready. Discover more > | Check our live demo >
-Version: 1.3.8.6
+Version: 1.3.9
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yith-proteo
diff --git a/style.css b/style.css
index 75a69b0..1d0e419 100644
--- a/style.css
+++ b/style.css
@@ -6,7 +6,7 @@ Author: YITH
Author URI: https://yithemes.com
Description: Proteo is a sleek, modern and “Gutenberg-friendly” e-commerce theme. Developed with a beautiful UI and a minimal design, is perfect for each kind of shop. Easy to manage and to customize, Proteo is the best solution if you want a complete e-commerce template and start quickly to sell your products with WooCommerce without a technical knowledge. Use it also for corporate site or a blog: there are no limits about what you can do with a beautiful and usable theme like this! Main features: Colors and Typography customization (Google font support), Logo customization, 3 different Header layouts, Advanced customizer theme options, Sidebar Management, Sidebar Chooser on each page and product, Page title icons, Top Bar Management, Easy main color shade chooser, Buttons style management (gradient buttons support), Footer management with multiple sidebars, WooCommerce support, Shop Theme Options, Custom WooCommerce messages and animated WooCommerce alert notices, Two cart page layouts, Bootstrap grid system, CSS animations, Gutenberg support, Responsive, Fullscreen search, Multilevel menus, Support to all YITH plugins, SVG icons for HiDPI screens, Translation Ready. Discover more > | Check our live demo >
-Version: 1.3.8.6
+Version: 1.3.9
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yith-proteo