Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#7668 closed enhancement (wontfix)

Docs: Add note regarding the cancel option of sortable

Reported by: lessan Owned by:
Priority: minor Milestone: 1.9.0
Component: [meta] ui.docs Version: 1.8.15
Keywords: Cc:
Blocked by: Blocking:

Description

When setting the cancel option for sortable, it overrides the default built-in cancel selector.

For example, if you set this:

$( ".selector" ).sortable({ cancel: 'button' });

Then any text boxes in the affected area will no longer cancel drag. See this blog post regarding the same issue: http://weblogs.asp.net/jeffwids/archive/2011/01/31/jquery-textbox-in-sortable-is-not-clickable-selectable.aspx

Could you please add a note to the docs (http://jqueryui.com/demos/sortable/#option-cancel) stating this? For example:

Note: setting this option overrides the default of ':input,button'.

Change History (3)

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

Resolution: wontfix
Status: newclosed

It doesn't make sense to make a note about what the word default means for a single option. All options have defaults and explicitly setting the option always overrides the default.

comment:2 Changed 8 years ago by lessan

I just realized that the default values are shown on the page (in a very obvious place too, facepalm!).

Sorry for the ticket, you're absolutely right there's no point adding a note stating the obvious.

comment:3 Changed 5 years ago by rgj

What's not so obvious is that cancelling drag will also prevent any clicks in a text input field or select element. It really would help to add this as a little note to the documentation.

"Prevents sorting" is really something different from "Prevent working"

http://jsfiddle.net/cv5ar8g6/1/

Last edited 5 years ago by rgj (previous) (diff)
Note: See TracTickets for help on using tickets.