r2838 - labs selectables: fixed bug where inner nodes produced errors
Author: paul.bakaus
Date: Thu Jun 25 00:47:53 2009
New Revision: 2838
Modified:
branches/labs/selectable-labs/demo/default.html
branches/labs/selectable-labs/ui.selectable.js
Log:
labs selectables: fixed bug where inner nodes produced errors
Modified: branches/labs/selectable-labs/demo/default.html
==============================================================================
--- branches/labs/selectable-labs/demo/default.html (original)
+++ branches/labs/selectable-labs/demo/default.html Thu Jun 25 00:47:53 2009
@@ -48,7 +48,7 @@
<div class="demo">
<ul id="selectable" tabindex='1'>
- <li class="ui-state-default">Item 1</li>
+ <li class="ui-state-default"><h2>Item 1</h2></li>
<li class="ui-state-default">Item 2</li>
<li class="ui-state-default">Item 3</li>
<li class="ui-state-default">Item 4</li>
Modified: branches/labs/selectable-labs/ui.selectable.js
==============================================================================
--- branches/labs/selectable-labs/ui.selectable.js (original)
+++ branches/labs/selectable-labs/ui.selectable.js Thu Jun 25 00:47:53 2009
@@ -197,7 +197,8 @@
},
_targetIsItem: function(item) {
- return $(item).parents().andSelf().is(':data(selectable-item)') && item;
+ var found =
$(item).parents().andSelf().filter(':data(selectable-item)');
+ return found.length && found;
},
_selection: [],