Closed Bug 232795 Opened 17 years ago Closed 15 years ago

In <bookmarksMenu.js>, "Error: aDragSession.sourceNode has no properties"

Categories

(SeaMonkey :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey1.1alpha

People

(Reporter: sgautherie, Assigned: sgautherie)

References

Details

(Keywords: fixed-seamonkey1.1a, verified1.8.1, Whiteboard: [verified-seamonkey1.1a])

Attachments

(7 obsolete files)

[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113] (W98SE)

{
Error: aDragSession.sourceNode has no properties
Source File: chrome://communicator/content/bookmarks/bookmarksMenu.js
Line: 598
}
Code is
{
      // missing Exit events.
      if (aDragSession.sourceNode.localName != "menuitem" &&
aDragSession.sourceNode.localName != "menu")
        setTimeout(function () { if (This.mCurrentDragOverTarget) 
}

Reproductible: 100%
1. Drag a file from Windows Explorer over the Bookmarks menu.
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a2) Gecko/20040714] (release) (W98SE)

Line number changed:
{{
Error: aDragSession.sourceNode has no properties
Source File: chrome://communicator/content/bookmarks/bookmarksMenu.js
Line: 614
}}
(In reply to comment #1)
> Line number changed:
> {{
> Error: aDragSession.sourceNode has no properties
> Source File: chrome://communicator/content/bookmarks/bookmarksMenu.js
> Line: 614
> }}

Line 613 actually ! (my file had an extra line...)
Fixes the error.

Side-effect: the menus do not open anymore when hovering them (dragging a
windows file).
I don't know if this is the intended behaviour !?
Assignee: p_ch → gautheri
Status: NEW → ASSIGNED
Comment on attachment 153613 [details] [diff] [review]
(Av1-MS) <bookmarksMenu.js> (Moz.Suite part)

See comment 3 !
Attachment #153613 - Flags: review?(neil.parkwaycc.co.uk)
Let's see if Jan can throw any light on the subject...
I got the same error message when using the doctype "<!DOCTYPE HTML PUBLIC "-
//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">" - leaving 
it works fine (Moz 1.7, Win2000).
Product: Browser → Seamonkey
Maybe the issue in comment 3 has something to do with bug 203573. The code in
bookmarksmenu.js takes into account for the fact that in windows dragging
prevents timers from firing. But externally dragged files don't suffer from that
bug.
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20051012 SeaMonkey/1.1a]
(nightly) (W98SE)

{{
Error: aDragSession.sourceNode has no properties
Source File: chrome://communicator/content/bookmarks/bookmarksMenu.js
Line: 632
}}

I noticed (FireFox) bug 303916 has been fixed, for a +/- similar issue;
but (Core) bug 203573 has not yet.
Comment on attachment 153613 [details] [diff] [review]
(Av1-MS) <bookmarksMenu.js> (Moz.Suite part)

Perhaps instead of !aDragSession.sourceNode || you should be using
aDragSession.sourceNode &&?
Attached patch (Av2-XPFE) <bookmarksMenu.js> (obsolete) — Splinter Review
Av1-MS, with comment 7 and 9 suggestion(s).

[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1a2) Gecko/20060511 SeaMonkey/1.1a] (tinderbox-builds, 2006051111) (W98SE)

This new patch tests nicely on the 1.8 branch.
Attachment #153613 - Attachment is obsolete: true
Attachment #221833 - Flags: superreview?(neil)
Attachment #221833 - Flags: review?(neil)
Attachment #221833 - Flags: approval-branch-1.8.1?(neil)
Attachment #153613 - Flags: review?(neil)
Comment on attachment 221833 [details] [diff] [review]
(Av2-XPFE) <bookmarksMenu.js>

I think we'll also need to comment on the definition of isTimerSupported that we'll override it in the case of an external drag.
Attachment #221833 - Flags: superreview?(neil)
Attachment #221833 - Flags: superreview?(jag)
Attachment #221833 - Flags: review?(neil)
Attachment #221833 - Flags: review+
Attachment #221833 - Flags: superreview?(jag) → superreview+
Attached patch (Av2a-XPFE) <bookmarksMenu.js> (obsolete) — Splinter Review
Av2-XPFE, with comment 11 suggestion(s).

Keeping
[[
(Av2-XPFE) <bookmarksMenu.js>   	 patch   	2006-05-12 12:08 PDT  	1.92 KB  	neil: review+
jag: superreview+
]]
Attachment #221833 - Attachment is obsolete: true
Attachment #221897 - Flags: superreview+
Attachment #221897 - Flags: review+
Attachment #221897 - Flags: approval-branch-1.8.1?(neil)
Attachment #221833 - Flags: approval-branch-1.8.1?(neil)
Attached patch (Bv1-TK) <bookmarksMenu.js> (obsolete) — Splinter Review
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1a2) Gecko/20060511 BonEcho/2.0a2] (nightly) (W98SE)

Port/Copy Av2a-XPFE to Toolkit:
fixes
[[
Error: aDragSession.sourceNode has no properties
Source File: chrome://browser/content/bookmarks/bookmarksMenu.js
Line: 787
]]
and
the fact that the sub-menus (in the Bookmarks menu, for example) were not opening at all (for an external drag).
Attachment #221900 - Flags: review?(mconnor)
Attachment #221900 - Flags: approval-branch-1.8.1?(mconnor)
Comment on attachment 221897 [details] [diff] [review]
(Av2a-XPFE) <bookmarksMenu.js>

>+  // Needs to be dynamically overrided (to |true|) in the case of an external drag: see bug 232795.
Nit: strong verb, past tense is "overridden". Otherwise, nice detective work!
Attachment #221897 - Flags: approval-branch-1.8.1?(neil) → approval-branch-1.8.1+
Av2a-XPFE, with comment 14 suggestion(s).

Keeping
[[
(Av2a-XPFE) <bookmarksMenu.js>   	 patch   	2006-05-13 06:51 PDT  	2.31 KB  	gautheri: review+
gautheri: superreview+
neil: approval&#8209;branch&#8209;1.8.1+ 
]]

****

Thanks: yesterday, I restarted from my initial patch, tested your suggestion, and, after reading martijn's bug 203573 comment 6, eventually thought of what should be done ;-)
Attachment #221897 - Attachment is obsolete: true
Attachment #221916 - Flags: superreview+
Attachment #221916 - Flags: review+
Attachment #221916 - Flags: approval-branch-1.8.1+
Attached patch (Bv1a-TK) <bookmarksMenu.js> (obsolete) — Splinter Review
Bv1-TK, with comment 14 suggestion(s).
Attachment #221900 - Attachment is obsolete: true
Attachment #221918 - Flags: review?
Attachment #221918 - Flags: approval-branch-1.8.1?(mconnor)
Attachment #221900 - Flags: review?(mconnor)
Attachment #221900 - Flags: approval-branch-1.8.1?(mconnor)
Attachment #221918 - Flags: review? → review?(mconnor)
Comment on attachment 221916 [details] [diff] [review]
(Av2b-XPFE) <bookmarksMenu.js>
[Checkin: Comment 17 & 19]


Checkin: { 2006-05-14 02:56	bugzilla%standard8.demon.co.uk 	mozilla/xpfe/components/bookmarks/resources/bookmarksMenu.js 	1.23 }
Attachment #221916 - Attachment description: (Av2b-XPFE) <bookmarksMenu.js> → (Av2b-XPFE) <bookmarksMenu.js> [Checkin: Comment 17]
Bv1a-TK, with 1 missed comment change.
Attachment #221918 - Attachment is obsolete: true
Attachment #221957 - Flags: review?(mconnor)
Attachment #221957 - Flags: approval-branch-1.8.1?(mconnor)
Attachment #221918 - Flags: review?(mconnor)
Attachment #221918 - Flags: approval-branch-1.8.1?(mconnor)
Comment on attachment 221916 [details] [diff] [review]
(Av2b-XPFE) <bookmarksMenu.js>
[Checkin: Comment 17 & 19]


Checkin: {
2006-05-17 02:19	neil%parkwaycc.co.uk 	mozilla/xpfe/components/bookmarks/resources/bookmarksMenu.js 	1.21.8.2 	MOZILLA_1_8_BRANCH
}
Attachment #221916 - Attachment description: (Av2b-XPFE) <bookmarksMenu.js> [Checkin: Comment 17] → (Av2b-XPFE) <bookmarksMenu.js> [Checkin: Comment 17 & 19]
Attachment #221916 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
OS: Windows 98 → All
Hardware: PC → All
Resolution: --- → FIXED
Whiteboard: [Bv1b-TK (port-to-FireFox) patch waiting for r?/a?]
Target Milestone: --- → seamonkey1.1alpha
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1a2) Gecko/20060518 SeaMonkey/1.1a] (nightly) (W98SE)

V.Fixed on MOZILLA_1_8_BRANCH.
Whiteboard: [Bv1b-TK (port-to-FireFox) patch waiting for r?/a?] → [Bv1b-TK (port-to-FireFox) patch waiting for r?/a?] [verified-seamonkey1.1a]
Attachment #221957 - Flags: review?(mconnor)
Attachment #221957 - Flags: review+
Attachment #221957 - Flags: approval-branch-1.8.1?(mconnor)
Attachment #221957 - Flags: approval-branch-1.8.1+
Comment on attachment 221957 [details] [diff] [review]
(Bv1b-TK) <bookmarksMenu.js>
[Checkin: Comment 21]


Checkin: {
2006-05-31 09:21	bugzilla%standard8.demon.co.uk 	mozilla/browser/components/bookmarks/content/bookmarksMenu.js 	1.55

2006-06-01 09:58	bugzilla%standard8.demon.co.uk 	mozilla/browser/components/bookmarks/content/bookmarksMenu.js 	1.48.2.8 	MOZILLA_1_8_BRANCH
}
Attachment #221957 - Attachment description: (Bv1b-TK) <bookmarksMenu.js> → (Bv1b-TK) <bookmarksMenu.js> [Checkin: Comment 21]
Attachment #221957 - Attachment is obsolete: true
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1a3) Gecko/20060602 BonEcho/2.0a3] (nightly) (W98SE)

V.Fixed on MOZILLA_1_8_BRANCH.
Whiteboard: [Bv1b-TK (port-to-FireFox) patch waiting for r?/a?] [verified-seamonkey1.1a] → [verified-seamonkey1.1a]
Blocks: 420341
You need to log in before you can comment on or make changes to this bug.