[#9041] Drag folders is not working on IE
Summary Drag folders is not working on IE
Queue IMP
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners slusarz@horde.org
Requester goncalo.queiros@portugalmail.net
Created 2010-05-18 (3412 days ago)
Due
Updated 2010-09-07 (3300 days ago)
Assigned 2010-06-04 (3395 days ago)
Resolved 2010-09-07 (3300 days ago)
Milestone 5
Patch Yes

Comments
goncalo.queiros@portugalmail.net 2010-05-18 15:12:31
When you try to drag a folder on IE it doesn't work. Discovered that 
its because Imp is setting a zindex of NaN..in firefox it seems to 
convert that zindex to 999 but IE throws an error and nothing is done.
Don't know if the patch is the best way to solve this issue, or if the 
zindex of the element should be setted before reach the line that i 
changed.

Also, dropping a folder A inside folder B will work, but will brake 
the UI since folder B will not show the + sign (nor will be 
expandable)..if the browser is refreshed all is fine, the + sign is 
back and we can expand the B folder and get the A folder out again.
When we are mousing over folder B (while dragging folder A), the 
message is displayed on the wrong place.
Both this behaviors can be observed in any browser.
Sorry for not correcting this.

Jan Schneider <jan@horde.org> 2010-05-18 16:29:01
Already fixed locally. Will be available with the next push.

Jan Schneider <jan@horde.org> 2010-05-18 16:29:42
Actually only the first part.

Michael Slusarz <slusarz@horde.org> 2010-05-18 17:25:47
> Also, dropping a folder A inside folder B will work, but will brake 
> the UI since folder B will not show the + sign (nor will be 
> expandable)..if the browser is refreshed all is fine, the + sign is 
> back and we can expand the B folder and get the A folder out again.
> When we are mousing over folder B (while dragging folder A), the 
> message is displayed on the wrong place.
> Both this behaviors can be observed in any browser.

I don't see this on any browser.


goncalo.queiros@portugalmail.net 2010-05-18 17:42:35
I attached an image that can show what i mean about the drag message.
To simulate the other problem, just create two folders on the base 
level, drag one of them inside the other one..now try to open the 
folder (at least here i can't..there's a javascript error 
"doActionComplete  TypeError: 
$(this.getSubFolderId(this.getFolderId(ob.pa))) is null" ...


Michael Slusarz <slusarz@horde.org> 2010-05-18 18:08:18
> I attached an image that can show what i mean about the drag message.
> To simulate the other problem, just create two folders on the base 
> level, drag one of them inside the other one..now try to open the 
> folder

This is exactly what I am doing, and I can't reproduce (tested on FF 
and IE; tested with empty namespace and 'INBOX.' as namespace).  You 
will need to debug the JS code yourself.


goncalo.queiros@portugalmail.net 2010-05-18 18:26:07
Will do. As soon as i know something i let you know


goncalo.queiros@portugalmail.net 2010-05-18 19:36:09
Didn't check the message yet, but found the drag & drop folder..
This only happens if the folder you are dragging to is empty..
DimpBase line 2532 
$(this.getSubFolderId(this.getFolderId(ob.pa))).down() is null, 
because there's no sub_fldXXX LI created, thus the .down will throw an 
error.
The LI is created only on page refresh if the folder has any 
childrens..can you confirm that?

Michael Slusarz <slusarz@horde.org> 2010-06-04 02:48:05
Finally managed to reproduce.  Got it to break when I dragged a 
mailbox into another mailbox that was empty, but had an unsubscribed 
mailbox underneath it.

The problem is that IMP_Imap_Tree is not catching that the base 
mailbox is "changed", and without informing dimpbase.js that this base 
mailbox is changed it is trying to add a subfolder to an element that 
doesn't exist (the subfolder is normally created by the change action).

Git Commit <commits@lists.horde.org> 2010-09-07 05:44:47
Changes have been made in Git for this ticket:

Fix Bug #9041
Correctly determine folder diff when folder contains unsubscribed
mailboxes, which are not visible in the current mode.

http://git.horde.org/diff.php/imp/lib/Imap/Tree.php?rt=horde-git&r1=6e1c57025b1661dd1a5a0e226241ef0fa2223209&r2=be741280870c216ca0d21e9a262e045b4899c1c5