Last Comment Bug 546090 - Tab drop indicator no longer disappears after a drop
: Tab drop indicator no longer disappears after a drop
Status: RESOLVED FIXED
: regression
Product: SeaMonkey
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: seamonkey2.1a1
Assigned To: BlueAppleSlushie
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-14 05:35 PST by neil@parkwaycc.co.uk
Modified: 2010-03-12 08:08 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch to hide drop indicator after drop (2.60 KB, patch)
2010-03-12 02:08 PST, BlueAppleSlushie
no flags Details | Diff | Splinter Review
Patch to hide drop indicator after drop (2) (962 bytes, patch)
2010-03-12 04:30 PST, BlueAppleSlushie
neil: review+
Details | Diff | Splinter Review

Description neil@parkwaycc.co.uk 2010-02-14 05:35:51 PST
Possibly as a result of the drag-n-drop changes (Enn can you confirm or deny?) we no longer get a drag exit when something gets dropped on the tabstrip.
Comment 1 Neil Deakin 2010-02-14 20:24:13 PST
That's correct. dragexit doesn't and shouldn't fire when a drop occurs, although that dragexit was firing was itself a regression behaviour that was only added when I implemented the new api.
Comment 2 BlueAppleSlushie 2010-03-12 02:08:08 PST
Created attachment 432109 [details] [diff] [review]
Patch to hide drop indicator after drop

Since the ondragexit handler is no longer called after a drop is completed, the code to hide the drop indicator needed to be copied to the ondragdrop handler.
Comment 3 neil@parkwaycc.co.uk 2010-03-12 02:41:29 PST
Comment on attachment 432109 [details] [diff] [review]
Patch to hide drop indicator after drop

Thanks for looking into this! Some notes:
1. You don't actually set review+ yourself. You set review? with someone suitable from the peer list, and then they set review+ (or maybe review-).

>-                  ondragexit="nsDragAndDrop.dragExit(event, this.parentNode.parentNode); event.stopPropagation();">
>+                  ondragleave="nsDragAndDrop.dragExit(event, this.parentNode.parentNode); event.stopPropagation();">
2. What's the difference between ondragexit and ondragleave? (Perhaps there's a web page that describes this.)

>       <method name="onDrop">
>         <parameter name="aEvent"/>
>         <parameter name="aXferData"/>
>         <parameter name="aDragSession"/>
>         <body>
>           <![CDATA[
>             var newIndex = this.getDropIndex(aEvent);
>             var tabIndex;
3. I would have thought that hiding the indicator would be the first thing to do.

>+			document.getAnonymousElementByAttribute(this, "class",
4. Somehow the spaces on this line got changed into tabs, which is wrong.
Comment 4 neil@parkwaycc.co.uk 2010-03-12 02:54:17 PST
(In reply to comment #3)
>>-                  ondragexit="nsDragAndDrop.dragExit(event, this.parentNode.parentNode); event.stopPropagation();">
>>+                  ondragleave="nsDragAndDrop.dragExit(event, this.parentNode.parentNode); event.stopPropagation();">
>2. What's the difference between ondragexit and ondragleave? (Perhaps there's a
>web page that describes this.)
I looked this up, and I don't think I want this change until we stop using nsDragAndDrop.
Comment 5 BlueAppleSlushie 2010-03-12 04:27:32 PST
(In reply to comment #3)
> 1. You don't actually set review+ yourself. You set review? with someone
> suitable from the peer list, and then they set review+ (or maybe review-).
ok

> 3. I would have thought that hiding the indicator would be the first thing to
> do.
Fixed.  I know I can declare variables anywhere and yet...

> >+			document.getAnonymousElementByAttribute(this, "class",
> 4. Somehow the spaces on this line got changed into tabs, which is wrong.
Fixed.  Probably.

> >2. What's the difference between ondragexit and ondragleave? (Perhaps there's a
> >web page that describes this.)
> I looked this up, and I don't think I want this change until we stop using
> nsDragAndDrop.
Reverted to ondragexit.  nsDragAndDrop seemed to not mind the change from ondragexit to ondragleave but when I changed ondragdrop to ondrop I got some strange behaviour (repositioned tabs reloaded everytime!)
Comment 6 BlueAppleSlushie 2010-03-12 04:30:05 PST
Created attachment 432121 [details] [diff] [review]
 Patch to hide drop indicator after drop (2)
Comment 7 neil@parkwaycc.co.uk 2010-03-12 04:39:53 PST
Comment on attachment 432121 [details] [diff] [review]
 Patch to hide drop indicator after drop (2)

>+                    .collapsed = true;													
Not having much luck with tabs, are you ;-)
Comment 8 neil@parkwaycc.co.uk 2010-03-12 04:40:55 PST
Whomever checks in the patch, please remove the tabs, thanks.
Comment 9 Robert Kaiser 2010-03-12 08:08:15 PST
Pushed as http://hg.mozilla.org/comm-central/rev/b8d59c7adc0c - trailing tabs removed.

Note You need to log in before you can comment on or make changes to this bug.