Modify

Opened 12 years ago

Closed 12 years ago

#10687 closed defect (fixed)

Can't drag item into last table row

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: AdminEnumListPlugin
Severity: normal Keywords:
Cc: Jun Omae, Stepan Riha Trac Release:

Description

It is not currently possible to drag an item into the last row. I found one hint that suggested this is because the last element is flush against the bottom of the container, and the solution is to add some padding.

Attachments (1)

t10687-r12416-mousemove.diff (1.6 KB) - added by Jun Omae 12 years ago.
including fix of #10664

Download all attachments as: .zip

Change History (10)

Changed 12 years ago by Jun Omae

including fix of #10664

comment:1 Changed 12 years ago by Jun Omae

I just found the same ;)

This issue is caused by the broken capture of mouse position. The following code does not work.

    $().mousemove(function(e) {
        mouseY = e.pageY;
    });

Also, it causes the another issue. After clicking checkbox or radio buttons, it cannot drag the items.

After t10687-r12416-mousemove.diff, it would be possible to drag into the last row.

comment:2 Changed 12 years ago by Ryan J Ollos

Thanks! I will commit the change by later this evening. If you have a chance to look at any of the other changes and have any comments, I appreciate any feedback you have.

comment:3 Changed 12 years ago by Ryan J Ollos

Status: newassigned

I have to wonder though, why the original author didn't just use jQuery UI's sortable widget, which should handle a lot of this work behind the scenes. The API docs say it has been available since jQuery UI 1.0.

The BacklogPlugin utilizes the sortable widget, and the code is much more concise.

comment:4 Changed 12 years ago by Ryan J Ollos

This ticket is next up on my list, but I'll have to wait until morning. Thanks for all of your testing!

comment:5 in reply to:  3 Changed 12 years ago by Jun Omae

Replying to rjollos:

I have to wonder though, why the original author didn't just use jQuery UI's sortable widget, which should handle a lot of this work behind the scenes. The API docs say it has been available since jQuery UI 1.0.

+1, good idea and useful information. I didn't think that sortable works with table elements.

comment:6 Changed 12 years ago by Ryan J Ollos

(In [12460]) Refs #10687:

  • FIX: It was not possible to drag an item into the last row.
  • FIX: drag of items was broken after selecting a checkbox, radio button or select.

Patch by Jun Omae (jun66j5).

comment:7 Changed 12 years ago by Ryan J Ollos

I previously ran into trouble getting the sortable widget working with Trac 0.11 while working on the BacklogPlugin. I'm not certain, but I suspect that the sortable widget won't work with the versions of jQuery in Trac 0.11.x (see comment:5:ticket:10657).

comment:8 in reply to:  7 Changed 12 years ago by anonymous

Replying to rjollos:

I previously ran into trouble getting the sortable widget working with Trac 0.11 while working on the BacklogPlugin.

I see now that I had some luck getting jQuery UI 1.6 working with Trac 0.11.1 and later in #10331, so I've created ticket #10732 for using the Sortable widget in this plugin. I guess this is a good step to make prior to t:#10994.

comment:9 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.