From 4148acfa9a7b1494f2d87559362c07a59f8e47f8 Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 3 Jul 2013 14:38:35 -0400 Subject: Tabs: Prevent default action of clicks even when disabled. Fixes #9413 - Tabs: Disabled tabs are still clickable. --- ui/jquery.ui.tabs.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 4362421db..5f81cda10 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -477,11 +477,7 @@ $.widget( "ui.tabs", { }, _setupEvents: function( event ) { - var events = { - click: function( event ) { - event.preventDefault(); - } - }; + var events = {}; if ( event ) { $.each( event.split(" "), function( index, eventName ) { events[ eventName ] = "_eventHandler"; @@ -489,6 +485,12 @@ $.widget( "ui.tabs", { } this._off( this.anchors.add( this.tabs ).add( this.panels ) ); + // Always prevent the default action, even when disabled + this._on( true, this.anchors, { + click: function( event ) { + event.preventDefault(); + } + }); this._on( this.anchors, events ); this._on( this.tabs, { keydown: "_tabKeydown" } ); this._on( this.panels, { keydown: "_panelKeydown" } ); -- cgit v1.2.3 From 382a77502e8959d065a36677c869d895a3ca2cf6 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 9 Jul 2013 11:12:29 -0400 Subject: Widget: Remove leftover back-compat handling for widget instance storage (see #8801). --- ui/jquery.ui.widget.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 9fc0136c4..958f62e55 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -271,9 +271,6 @@ $.Widget.prototype = { // all event bindings should go through this._on() this.element .unbind( this.eventNamespace ) - // 1.9 BC for #7810 - // TODO remove dual storage - .removeData( this.widgetName ) .removeData( this.widgetFullName ) // support: jquery <1.6.3 // http://bugs.jquery.com/ticket/9413 -- cgit v1.2.3