Skip to main content

Search and Top Navigation

#4013 closed feature (wontfix)

Opened January 30, 2009 07:43PM UTC

Closed February 07, 2013 07:02PM UTC

Selectable - Include option to act as CTRL/CMD key always pressed.

Reported by: luenyar Owned by: luenyar
Priority: minor Milestone: 2.0.0
Component: ui.selectable Version: 1.6rc6
Keywords: Cc:
Blocked by: Blocking:
Description

It would be handy to be able to set an option to Selectable that causes it to behave as if CTRL/CMD key is always pressed, ie never start a new select, just keep adding to the selection. It is very possible I am the only person that would find this useful but I think it would also be an easy addition. Anywhere the event.metakey is checked, it could also check for options.mode or whatever it might be named.

Attachments (0)
Change History (9)

Changed February 17, 2009 12:33PM UTC by jzaefferer comment:1

milestone: TBD1.next

Seems reasonable, but certainly not a high priority.

Changed June 26, 2012 01:22AM UTC by scottgonzalez comment:2

type: enhancementfeature

Changed October 03, 2012 04:53PM UTC by scottgonzalez comment:3

milestone: 1.next2.0.0

Changed November 04, 2012 07:43PM UTC by jzaefferer comment:4

status: newopen

To be considered for the rewrite. Should be possible to customize enough to get this behaviour, probably through events/methods, not an option.

Changed February 05, 2013 05:22PM UTC by scottgonzalez comment:5

owner: → luenyar
status: openpending

Would this make it impossible to unselect a specific item or would you want cmd+click to be inverted? What are the use cases?

Changed February 07, 2013 05:19PM UTC by luenyar comment:6

status: pendingnew

Replying to [comment:5 scott.gonzalez]:

Would this make it impossible to unselect a specific item or would you want cmd+click to be inverted? What are the use cases?

You can deselect, the way I did it at least. I have a table of data I want to selectively output to something else. Clicking row 3 highlights it. Clicking row 5 highlights it. Clicking row 3 again deselects it. Same functionality as is currently available if CTRL/CMD is used, just saves the user having to hold it. Useful in my case because user is often selecting multiple non-adjacent rows. I did it "improperly" by adding to the core file, _mouseStart function, "event.metaKey=true" , but could be "event.metaKey=options.metaKeyMode" or something more, proper.

Changed February 07, 2013 05:30PM UTC by scottgonzalez comment:7

status: newpending

I'd rather see users implement this on top of #7013. This type of behavior is often tied to checkboxes as well. Is there anything we'd be missing that would make this difficult to use if there were methods for toggling the selected state of specific elements?

Changed February 07, 2013 06:40PM UTC by luenyar comment:8

status: pendingnew

I think you might be right. If a tr or div click event can toggle its own selected state, the end result should be the same. Plus that should extend to the trap selection functionality too right? Drag a trap around several rows and toggle them all?

Changed February 07, 2013 07:02PM UTC by scottgonzalez comment:9

resolution: → wontfix
status: newclosed

We'll have to wait until the new API is designed to figure out the specifics, but as of right now, I'd say yes.