Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#9968 closed feature (wontfix)

jQuery ui.Sortable - Need to trigger an event once delay completed before/without move the item

Reported by: HariPa Owned by: HariPa
Priority: minor Milestone: none
Component: ui.sortable Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:

Description

Hi ,

In Jquery UI.Sortable, We can give delay to start the sort.

I want to know , is there any event that to identify once the delay(i.e.,ms) completed.

I tried all events in the API list, start, activate,...but no luck.

All the events triggered, when i started to move the item.

Once the delay completed, it allow me to sort. But i want to know, when i hold(click & hold) the item for some nth-millisecond - trigger an event once the delay time completed or identify it allow to drag & represent it different view before move the item

Kindly provide any idea to proceed ASAP.

Note: If any further info required, kindly let me know.

Thanks, Hari

Change History (4)

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

Owner: set to HariPa
Status: newpending

Why do you need such an event?

comment:2 Changed 6 years ago by HariPa

Status: pendingnew

Hi,

Currently i can differentiate the drag/select item by click & move using mouse. On that time, i can apply some style for the sortable item.

But i have a requirement like below,

  1. set delay as 100ms
  2. click & hold using mouse for less than 100ms, we can't move. That's working fine.
  3. click & hold using mouse for greater than equal to 100ms, we can move. but until we can drag user doesn't know whether the selected item can able to move or not.

So after delay completed, need an intimation for that selected item can view different apart from other items.

For this purpose, we need an event.

Based on this event, we can achieve some operations.

Note: I have checked the events like start, activate,... All this events fired once the mouse click move from the item. We need to know once the delay completed till the mouse (drag) doesn't move. In that scenario, we have to handle some operation.

Kindly provide any valuable suggestion if you have.

Thanks & Regards, Hariharan

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

Resolution: wontfix
Status: newclosed

The intention of the delay option is to prevent accidental drags, so it doesn't make sense that the user is intentionally waiting for the delay to end to be notified that they can drag the item. If you really want to do this, you can just use .one( "sort", ... ) inside start and unbind it in stop just in case the sort never occurs.

The delay option is being removed as part of the rewrite (see more at http://wiki.jqueryui.com/Sortable). If you need more help, please use the forums or Stack Overflow.

comment:4 Changed 6 years ago by HariPa

Hi scott,

I agree with you. but i d'not think how it is actually prevent accidental drag. Any how user have to know right, once the delay completed before drag using mouse.

I already posted in jquery forum and stack overflow. If you have any points, you can share either forum or stack overflow.

Note: See TracTickets for help on using tickets.