Closed Bug 79548 Opened 23 years ago Closed 23 years ago

Middle-mouse-click to open URL in a new window broken

Categories

(SeaMonkey :: UI Design, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bzbarsky, Assigned: jst)

References

Details

(Keywords: regression)

Attachments

(2 files)

BUILD: 2001-05-08-13 (in titlebar).

WAS WORKING IN:  2001-05-08-08

STEPS TO REPRODUCE:
Middle-click on a link

EXPECTED RESULTS:
Open the link in a new window

ACTUAL RESULTS:
If the clipboard is empty, nothing. 
If there is data in the clipboard, pastes the data (and tries to load the data
as a URL) just as if the middle-click were over regular text.

Looks like we're not correctly detecting the fact that we're clicking inside an
<a href="whatever"> element.
Reassigning to jst.
Keywords: regression
Summary: Middle-mouse-click does open URLs in new window → Middle-mouse-click to open URL in a new window broken
er... reassigning for real
Assignee: pchen → jst
I think this is broken because |findParentNode| in
xpfe/communicator/resources/content/contentAreaUtils.js was broken by a change
that made us more DOM-compliant.  At least I'm guessing that this change was
made.  The |localName| property of next nodes is now returning the empty string,
which causes this function to break out of the loop on the first text node.  I
don't actually know what it used to return, but I'm guessing it wasn't empty. 
I'm not sure what the |if (!localName) return null;| was for before, but it must
not have been triggered by text nodes.
*** Bug 79686 has been marked as a duplicate of this bug. ***
blake, jst, etc. -- I'm looking for reviews for this fix.
There's not really a need to loop while node.nodeType is Node.TEXT_NODE (you can
use 'Node' here if you want to, you don't need to use
Components.interfaces.nsIDOMNode) since text nodes can't have children, an if
statemenet in stead of the while() loop would be sufficient, but obviously the
while loop works too, it's your call. sr=jst
Made both changes in my tree.
   (...of *course* text nodes don't have children... :-)
r=blake on new patch
It seems that this broke in win32 around the same time.  Does the attachment fix
the problem in win32?
*** Bug 79853 has been marked as a duplicate of this bug. ***
Fix checked in 2001-05-10 04:50 PDT.  (Although I think there might be some
other uses of localName that technically aren't guaranteed by the DOM spec...)
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
*** Bug 79890 has been marked as a duplicate of this bug. ***
works using a 16:44 debug build.
Status: RESOLVED → VERIFIED
fwiw, se and i just verified that cmd-click works for mac (from dupe bug 79890)
Yes, seems to have returned to life for me on CVS pulled at 2100 GMT on 10th May. 

(Hey guys, what's your timezone so I know what the time is where Mozilla lives?)

Thanks
*** Bug 80098 has been marked as a duplicate of this bug. ***
Mozilla resides in Pacific Standard Time, AFAIK.

http://nist.time.gov/
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: