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)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: bzbarsky, Assigned: jst)
References
Details
(Keywords: regression)
Attachments
(2 files)
646 bytes,
patch
|
Details | Diff | Splinter Review | |
578 bytes,
patch
|
Details | Diff | Splinter Review |
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.
Summary: Middle-mouse-click does open URLs in new window → Middle-mouse-click to open URL in a new window broken
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.
blake, jst, etc. -- I'm looking for reviews for this fix.
Assignee | ||
Comment 7•23 years ago
|
||
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... :-)
Comment 10•23 years ago
|
||
r=blake on new patch
Comment 11•23 years ago
|
||
It seems that this broke in win32 around the same time. Does the attachment fix the problem in win32?
Comment 12•23 years ago
|
||
*** 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
Comment 14•23 years ago
|
||
*** Bug 79890 has been marked as a duplicate of this bug. ***
Comment 16•23 years ago
|
||
fwiw, se and i just verified that cmd-click works for mac (from dupe bug 79890)
Comment 17•23 years ago
|
||
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
Comment 18•23 years ago
|
||
*** Bug 80098 has been marked as a duplicate of this bug. ***
Comment 19•23 years ago
|
||
Mozilla resides in Pacific Standard Time, AFAIK. http://nist.time.gov/
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•