Closed Bug 774362 Opened 12 years ago Closed 12 years ago

Switch to new drag and drop api for go and search buttons

Categories

(SeaMonkey :: Location Bar, defect)

defect
Not set
normal

Tracking

(seamonkey2.14 fixed)

RESOLVED FIXED
seamonkey2.14
Tracking Status
seamonkey2.14 --- fixed

People

(Reporter: iannbugzilla, Assigned: iannbugzilla)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch Switch go and search buttons (obsolete) — Splinter Review
This patch makes use of the helper introduced in bug 774125 and changes the go and search buttons to use the new API.
Attachment #642640 - Flags: review?(neil)
OS: Linux → All
Hardware: x86_64 → All
Comment on attachment 642640 [details] [diff] [review]
Switch go and search buttons

>+                ondragover="goButtonObserver.onDragOver(event);"
>+                ondragenter="goButtonObserver.onDragOver(event);"
Do we need both? We didn't seem to need them before...

>+  onDragOver: function (aEvent)
[Could almost write this as onDragOver: dragLinkOver, ]

>+  onDragExit: function (aEvent)
>+  {
>+  },
Is it worth keeping this?

>+  onDrop: function (aEvent)
>+  {
>+    var url = Services.droppedLinkHandler.dropLink(aEvent, {});
Does this work if you drag a string matching a bookmark keyword, rather than a link?
(In reply to neil@parkwaycc.co.uk from comment #1)
> Comment on attachment 642640 [details] [diff] [review]
> Switch go and search buttons
> 
> >+                ondragover="goButtonObserver.onDragOver(event);"
> >+                ondragenter="goButtonObserver.onDragOver(event);"
> Do we need both? We didn't seem to need them before...
Indeed it appears we don't.
> 
> >+  onDragOver: function (aEvent)
> [Could almost write this as onDragOver: dragLinkOver, ]
Fixed.
> 
> >+  onDragExit: function (aEvent)
> >+  {
> >+  },
> Is it worth keeping this?
Removed.
> 
> >+  onDrop: function (aEvent)
> >+  {
> >+    var url = Services.droppedLinkHandler.dropLink(aEvent, {});
> Does this work if you drag a string matching a bookmark keyword, rather than
> a link?
Yes, it does.
Attached patch Less drag exit (obsolete) — Splinter Review
Revised as per suggestions.
Attachment #642640 - Attachment is obsolete: true
Attachment #642640 - Flags: review?(neil)
Attachment #642996 - Flags: review?(neil)
Changes since last version:
* Fixed bitrot from update to dependent bug.
Attachment #642996 - Attachment is obsolete: true
Attachment #642996 - Flags: review?(neil)
Attachment #647365 - Flags: review?(neil)
Comment on attachment 647365 [details] [diff] [review]
Fix bitrot [Checked in: Comment 6]

>+                ondragexit="goButtonObserver.onDragExit(event);"/>
>+                ondragexit="searchButtonObserver.onDragExit(event);"/>
Nit: Still too much drag exit. r=me with that fixed.
Attachment #647365 - Flags: review?(neil) → review+
Comment on attachment 647365 [details] [diff] [review]
Fix bitrot [Checked in: Comment 6]

With ondragexits removed:
http://hg.mozilla.org/comm-central/rev/54f3c239ef7a
Attachment #647365 - Attachment description: Fix bitrot → Fix bitrot [Checked in: Comment 6]
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Flags: in-qa-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.14
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: