Skip to content
This repository
Browse code

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

  • Loading branch information...
commit e979160f89c7513541a99df5c530c5c3075d783a 1 parent d07f1b5
John Bender authored September 10, 2012

Showing 1 changed file with 14 additions and 2 deletions. Show diff stats Hide diff stats

  1. 16  js/widgets/popup.js
16  js/widgets/popup.js
@@ -319,12 +319,24 @@ define( [ "jquery",
319 319
 		},
320 320
 
321 321
 		_setOption: function( key, value ) {
322  
-			var setter = "_set" + key.charAt( 0 ).toUpperCase() + key.slice( 1 );
  322
+			var exclusions, setter = "_set" + key.charAt( 0 ).toUpperCase() + key.slice( 1 );
323 323
 
324 324
 			if ( this[ setter ] !== undefined ) {
325 325
 				this[ setter ]( value );
326 326
 			}
327  
-			if ( key !== "initSelector" ) {
  327
+
  328
+			// TODO REMOVE FOR 1.2.1 by moving them out to a default options object
  329
+			exclusions = [
  330
+				"initSelector",
  331
+				"closeLinkSelector",
  332
+				"closeLinkEvents",
  333
+				"navigateEvents",
  334
+				"closeEvents",
  335
+				"history",
  336
+				"container"
  337
+			];
  338
+
  339
+			if ( exclusions.indexOf( key ) == -1 ) {
328 340
 				// Record the option change in the options and in the DOM data-* attributes
329 341
 				$.mobile.widget.prototype._setOption.apply( this, arguments );
330 342
 				this.element.attr( "data-" + ( $.mobile.ns || "" ) + ( key.replace( /([A-Z])/, "-$1" ).toLowerCase() ), value );

0 notes on commit e979160

Please sign in to comment.
Something went wrong with that request. Please try again.