vendor/assets/javascripts/webshims/shims/combos/31.js in webshims-rails-1.12.0 vs vendor/assets/javascripts/webshims/shims/combos/31.js in webshims-rails-1.12.2
- old
+ new
@@ -607,11 +607,11 @@
requestAnimationFrame(trigger);
} else {
setTimeout(trigger, 0);
}
- }, (e.type == 'resize' && !window.requestAnimationFrame) ? 50 : 0);
+ }, (e.type == 'resize' && !window.requestAnimationFrame) ? 50 : 9);
};
})(),
_create: function(){
$.each({ Height: "getHeight", Width: "getWidth" }, function(name, type){
var body = document.body;
@@ -632,11 +632,11 @@
this.height = docObserve.getHeight();
this.width = docObserve.getWidth();
setInterval(this.test, 600);
$(this.test);
webshims.ready('WINDOWLOAD', this.test);
- $(document).on('updatelayout pageinit collapsibleexpand shown.bs.modal shown.bs.collapse slid.bs.carousel', this.handler);
+ $(document).on('updatelayout.webshim pageinit popupafteropen panelbeforeopen tabsactivate collapsibleexpand shown.bs.modal shown.bs.collapse slid.bs.carousel', this.handler);
$(window).on('resize', this.handler);
(function(){
var oldAnimate = $.fn.animate;
var animationTimer;
@@ -1079,14 +1079,14 @@
return retDesc;
};
});
webshims.isReady('webshimLocalization', true);
-});
-//html5a11y
-(function($, document){
- if(!$.webshims.assumeARIA || ('content' in document.createElement('template'))){return;}
+
+//html5a11y + hidden attribute
+(function(){
+ if(('content' in document.createElement('template'))){return;}
$(function(){
var main = $('main').attr({role: 'main'});
if(main.length > 1){
webshims.error('only one main element allowed in document');
@@ -1097,10 +1097,12 @@
if(('hidden' in document.createElement('a'))){
return;
}
+ webshims.defineNodeNamesBooleanProperty(['*'], 'hidden');
+
var elemMappings = {
article: "article",
aside: "complementary",
section: "region",
nav: "navigation",
@@ -1137,11 +1139,13 @@
addRole(footer, 'contentinfo');
}
}
});
-})(webshims.$, document);;
+})();
+});
+;
webshims.register('form-core', function($, webshims, window, document, undefined, options){
"use strict";
webshims.capturingEventPrevented = function(e){
if(!e._isPolyfilled){
@@ -1632,10 +1636,16 @@
$.data(datalist, 'datalistWidgetData', this);
lazyLoad('WINDOWLOAD');
if(webshims.isReady('form-datalist-lazy')){
- this._lazyCreate(opts);
+ if(window.QUnit){
+ that._lazyCreate(opts);
+ } else {
+ setTimeout(function(){
+ that._lazyCreate(opts);
+ }, 9);
+ }
} else {
$(opts.input).one('focus', lazyLoad);
webshims.ready('form-datalist-lazy', function(){
if(!that._destroyed){
that._lazyCreate(opts);
\ No newline at end of file