Tab drop indicator no longer disappears after a drop

RESOLVED FIXED in seamonkey2.1a1

Status

SeaMonkey
Tabbed Browser
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: neil@parkwaycc.co.uk, Assigned: BlueAppleSlushie)

Tracking

({regression})

Trunk
seamonkey2.1a1
x86
Windows XP
regression

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

8 years ago
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.
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.
(Assignee)

Comment 2

8 years ago
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.
Attachment #432109 - Flags: review+
(Reporter)

Comment 3

8 years ago
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.
Attachment #432109 - Flags: review+
(Reporter)

Comment 4

8 years ago
(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.
(Assignee)

Comment 5

8 years ago
(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!)
(Assignee)

Comment 6

8 years ago
Created attachment 432121 [details] [diff] [review]
 Patch to hide drop indicator after drop (2)
Attachment #432109 - Attachment is obsolete: true
(Reporter)

Comment 7

8 years ago
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 ;-)
Attachment #432121 - Flags: review+
(Reporter)

Comment 8

8 years ago
Whomever checks in the patch, please remove the tabs, thanks.
Assignee: nobody → BlueAppleSlushie
Status: NEW → ASSIGNED
Keywords: checkin-needed

Comment 9

8 years ago
Pushed as http://hg.mozilla.org/comm-central/rev/b8d59c7adc0c - trailing tabs removed.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Keywords: checkin-needed, helpwanted
Resolution: --- → FIXED
Whiteboard: [good first bug]
Target Milestone: --- → seamonkey2.1a1
You need to log in before you can comment on or make changes to this bug.