Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

exclude internal attributes from dom element, temp fix Fixes #4967

  • Loading branch information...
commit e979160f89c7513541a99df5c530c5c3075d783a 1 parent d07f1b5
@johnbender johnbender authored
Showing with 14 additions and 2 deletions.
  1. +14 −2 js/widgets/popup.js
View
16 js/widgets/popup.js
@@ -319,12 +319,24 @@ define( [ "jquery",
},
_setOption: function( key, value ) {
- var setter = "_set" + key.charAt( 0 ).toUpperCase() + key.slice( 1 );
+ var exclusions, setter = "_set" + key.charAt( 0 ).toUpperCase() + key.slice( 1 );
if ( this[ setter ] !== undefined ) {
this[ setter ]( value );
}
- if ( key !== "initSelector" ) {
+
+ // TODO REMOVE FOR 1.2.1 by moving them out to a default options object
+ exclusions = [
+ "initSelector",
+ "closeLinkSelector",
+ "closeLinkEvents",
+ "navigateEvents",
+ "closeEvents",
+ "history",
+ "container"
+ ];
+
+ if ( exclusions.indexOf( key ) == -1 ) {
// Record the option change in the options and in the DOM data-* attributes
$.mobile.widget.prototype._setOption.apply( this, arguments );
this.element.attr( "data-" + ( $.mobile.ns || "" ) + ( key.replace( /([A-Z])/, "-$1" ).toLowerCase() ), value );
Please sign in to comment.
Something went wrong with that request. Please try again.