vendor/assets/javascripts/webshims/shims/combos/30.js in webshims-rails-1.15.3 vs vendor/assets/javascripts/webshims/shims/combos/30.js in webshims-rails-1.15.4
- old
+ new
@@ -100,24 +100,29 @@
var singleVal = function(elem, name, val, pass, _argless){
return (_argless) ? oldVal.call($(elem)) : oldVal.call($(elem), val);
};
//jquery mobile and jquery ui
- if(!$.widget){
+ if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){
(function(){
var _cleanData = $.cleanData;
- $.cleanData = function( elems ) {
- if(!$.widget){
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ $.cleanData = (function( orig ) {
+ return function( elems ) {
+ var events, elem, i;
+ for ( i = 0; (elem = elems[i]) != null; i++ ) {
try {
- $( elem ).triggerHandler( "remove" );
- // http://bugs.jquery.com/ticket/8235
- } catch( e ) {}
+ // Only trigger remove when necessary to save time
+ events = $._data( elem, "events" );
+ if ( events && events.remove ) {
+ $( elem ).triggerHandler( "remove" );
+ }
+ // http://bugs.jquery.com/ticket/8235
+ } catch ( e ) {}
}
- }
- _cleanData( elems );
- };
+ orig( elems );
+ };
+ })( $.cleanData );
})();
}
$.fn.val = function(val){
@@ -534,11 +539,11 @@
elem.eq(0).prop('id', id);
}
return id;
};
})(),
- domPrefixes: ["ws", "webkit", "moz", "ms", "o"],
+ domPrefixes: ["webkit", "moz", "ms", "o", "ws"],
prefixed: function (prop, obj){
var i, testProp;
var ret = false;
if(obj[prop]){
@@ -1485,9 +1490,11 @@
if(webshims.replaceValidationplaceholder){
message = webshims.replaceValidationplaceholder(elem, message);
}
return message || '';
};
+
+ webshims.refreshCustomValidityRules = $.noop;
$.fn.getErrorMessage = function(key){
var message = '';
var elem = this[0];
if(elem){