Opened 11 years ago
Closed 11 years ago
#8846 closed feature (notabug)
Allow Default Click Event on Elements Within Selectable - Feature Request
Reported by: | chrishiestand | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.0 |
Component: | ui.selectable | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The current lack of default click or double-click events for selectable elements is frustrating. The "distance" parameter is not a sufficient workaround for many cases.
I have a couple ideas that I think would fix the problem.
- Allow default clicks on anything that does not match the filter option. In the example below, the filter only matches span elements. But at the moment, the links cannot be clicked. These could be allowed.
<ul class="ui-selectable" id="selectme"> <li><span>Here is item 1</span> <a href="1">(1 It would be useful to be able to click here)</a></li> <li><span>Here is item 2</span> <a href="2">(2 It would be useful to be able to click here)</a></li> <li><span>Here is item 3</span> <a href="3">(3 It would be useful to be able to click here)</a></li> </ul> <script type="text/javascript"> $(function() { $( "#selectme" ).selectable({ filter: 'span', }); }); </script>
- Add a separate filter, e.g. "defaultEventFilter" that determines which elements will fire their default event.
<script type="text/javascript"> $(function() { $( "#selectme" ).selectable({ defaultEventFilter: 'a', }); }); </script>
- ??? Whatever implementation is best is fine with me. But I think this behavior need to be improved.
Change History (2)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
Alright, thanks for the update.
Note: See
TracTickets for help on using
tickets.
Nevermind, the "cancel" option does exactly this, but I did not notice it earlier. Let's close this ticket.