aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-07-31 00:23:41 +0000
committerScott González <scott.gonzalez@gmail.com>2009-07-31 00:23:41 +0000
commit4f03ac24fd67c8e049cb93d49825212e5e501d90 (patch)
tree0a43edc0677922f37df59c3288a5f6bd474632f6 /ui
parentc0ba6ccda7294aa481124a51760f691ce6449c01 (diff)
downloadjquery-ui-4f03ac24fd67c8e049cb93d49825212e5e501d90.tar.gz
jquery-ui-4f03ac24fd67c8e049cb93d49825212e5e501d90.zip
Accordion: Don't stop propagation when clicking in headers. Fixes #4732 - accordion steals header clicks.
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.accordion.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/ui/ui.accordion.js b/ui/ui.accordion.js
index f40fe6c9f..a11cf94d2 100644
--- a/ui/ui.accordion.js
+++ b/ui/ui.accordion.js
@@ -101,7 +101,10 @@ $.widget("ui.accordion", {
this.headers.find('a').attr('tabIndex','-1');
if (o.event) {
- this.headers.bind((o.event) + ".accordion", function(event) { return self._clickHandler.call(self, event, this); });
+ this.headers.bind((o.event) + ".accordion", function(event) {
+ self._clickHandler.call(self, event, this);
+ event.preventDefault();
+ });
}
},
@@ -181,7 +184,8 @@ $.widget("ui.accordion", {
break;
case keyCode.SPACE:
case keyCode.ENTER:
- return this._clickHandler({ target: event.target }, event.target);
+ this._clickHandler({ target: event.target }, event.target);
+ event.preventDefault();
}
if (toFocus) {
@@ -246,7 +250,7 @@ $.widget("ui.accordion", {
_clickHandler: function(event, target) {
var o = this.options;
- if (o.disabled) return false;
+ if (o.disabled) { return; }
// called only when using activate(false) to close all parts programmatically
if (!event.target && o.collapsible) {
@@ -263,7 +267,7 @@ $.widget("ui.accordion", {
},
toShow = (this.active = $([]));
this._toggle(toShow, toHide, data);
- return false;
+ return;
}
// get the click target
@@ -272,7 +276,7 @@ $.widget("ui.accordion", {
// if animations are still active, or the active header is the target, ignore click
if (this.running || (!o.collapsible && clickedIsActive)) {
- return false;
+ return;
}
// switch classes
@@ -299,7 +303,7 @@ $.widget("ui.accordion", {
this.active = clickedIsActive ? $([]) : clicked;
this._toggle(toShow, toHide, data, clickedIsActive, down);
- return false;
+ return;
},