Opened 11 years ago

Closed 7 years ago

#4205 closed feature (duplicate)

Selectable: Unselecting selecting elements (+ sortables no conflict)

Reported by: rudasn Owned by:
Priority: minor Milestone: 2.0.0
Component: ui.selectable Version: 1.6rc6
Keywords: selectable, sortable, no conflict Cc:
Blocked by: Blocking:

Description

When I click on (or drag over) an unselected element it is selected. So I would expect that doing the same action on a selected element it will be unselected. In this way, if I select multiple elements and realise that the one in the middle is not what I wanted I can click on it and deselect it. Likewise, if I have a large list of items and I want to select all but a few, I can select those few first and then select them all (which would deselect the few previously selected elements).

I find this kind of behaviour more intuitive and more practical. What do you guys think?

I've implemented this functionality, along with a 'noConflict' option so that selectables works with sortables, in this demo: http://nicolas.rudas.info/jquery/selectables_sortables/

Changes are attached here but also found in the link above.

Attachments (1)

jquery.mouse.sort.select-edited.js (50.9 KB) - added by rudasn 11 years ago.
Changes to mouse, selectable, sortable methods to accommodate unselect and no conflict

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by rudasn

Changes to mouse, selectable, sortable methods to accommodate unselect and no conflict

comment:1 Changed 11 years ago by rudasn

Forgot to mention that I haven't really tested this and if it plays nicely with the rest of the plugins or ui core. However, the changes made are quite specific to selectables and sortables so I assume it would be ok.

comment:2 Changed 11 years ago by ajacksified

Awesome idea (also takes care of ticket #2946 http://dev.jqueryui.com/ticket/2946). A side note- it doesn't work in Chrome, if you weren't aware already.

comment:3 Changed 11 years ago by Jörn Zaefferer

Milestone: TBD1.8

Needs testing.

comment:4 Changed 10 years ago by friflaj

Has this been merged in 1.8a1? How do I use it?

comment:5 Changed 10 years ago by Sam Hasler

It doesn't work in IE8 either.

comment:6 Changed 7 years ago by Scott González

Milestone: 1.9.02.0.0

comment:7 Changed 7 years ago by Jörn Zaefferer

Status: newopen

Consider for redesign.

comment:8 Changed 7 years ago by Scott González

Resolution: duplicate
Status: openclosed
Summary: Selectables: Unselecting selecting elements (+ sortables no conflict)Selectable: Unselecting selecting elements (+ sortables no conflict)

Duplicate of #2946.

Note: See TracTickets for help on using tickets.