[V5] IE focus dropdown jumping issue #8885

Closed
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+12 −4
Diff settings

Always

Just for now

@@ -14,6 +14,7 @@
is_hover : false,
hover_timeout : 150,
no_pip : false,
+ no_focus : false,
opened : function () {},
closed : function () {}
},
@@ -165,7 +166,13 @@
dropdown.data('target', target.get(0)).trigger('opened.fndtn.dropdown', [dropdown, target]);
dropdown.attr('aria-hidden', 'false');
target.attr('aria-expanded', 'true');
- dropdown.focus();
+
+ var settings = target.data(this.attr_name(true) + '-init') || this.settings;
+
+ if (settings.no_focus === false) {
+ dropdown.focus();
+ }
+
dropdown.addClass('f-open-' + this.attr_name(true));
},
@@ -16,7 +16,8 @@
is_hover : true,
scrolltop : true, // jump to top when sticky nav menu toggle is clicked
sticky_on : 'all',
- dropdown_autoclose: true
+ dropdown_autoclose: true,
+ scroll_throttle: 300
},
init : function (section, method, options) {
@@ -430,9 +431,9 @@
sticky : function () {
var self = this;
- this.S(window).on('scroll', function () {
+ this.S(window).on('scroll', self.throttle( function () {
self.update_sticky_positioning();
- });
+ }, self.settings.scroll_throttle));
},
update_sticky_positioning : function () {