Closed
Bug 264975
Opened 20 years ago
Closed 19 years ago
'return false' in onClick does not prevent new/empty tab/window if target is named.
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: anita.kessler, Assigned: bugzilla)
Details
Attachments
(1 file)
|
506 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20041015 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20041015 Firefox/0.10.1
Although nothing should happen after a 'return false' in onClick in a [a href=..
onClick=..] appears, there is still an additional tab/window opened IF there is
a named target in [a href=.. onClick=.. target='sometarget']
Reproducible: Always
Steps to Reproduce:
1. Create a simple page "mypage.html"
2. Create a second page which includes:
<a href="mypage.html" target="sometargetwin"
onClick="window.open('mypage.html','mywin','width=300,height=300');return
false;">mypage with and without javascript</a>
3. Click on Link with JavaScript enabled.
Actual Results:
A new 300x300 window with "mypage.html" is opened AND a new tab/window with
"mypage.html" as well! Same effect if you set target="mywin".
Expected Results:
Only the 300x300 window with "mypage.html" should open, nothing else, as there
is return false!
If you don't use target=... everything works fine and as expected, like this:
<a href="mypage.html"
onClick="window.open('mypage.html','mywin','width=300,height=300');return
false;">mypage with and without javascript</a>WFM in Firefox 1.0, Windows. Reporter please try again using Firefox 1.0 with no tab browsing extensions that we don't care about here in Firefox bug land. If you still see the bug, attach a testcase with instructions and settings. For example I can't tell if you mean to activate the tab with a leftclick using the new tab browsing options, or a middleclick.
Comment 2•20 years ago
|
||
WFM with fresh installed mozilla 1.7.6. But after I installed MultiZilla extension (Mozilla/5.0 (X11; U; SunOS sun4u; zh-CN; rv:1.7.6) Gecko/20050322 MultiZilla/1.7.0.2d), the same as reporter. So it's extension's bug.
Comment 3•20 years ago
|
||
Mozilla (Linux) versions 1.7.7 and 1.7.8 exhibit this behavior, while Mozilla (Linux) 1.7.6 does not.
Comment 4•20 years ago
|
||
wfm, using: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050612 Firefox/1.0+
Comment 5•19 years ago
|
||
Just want to confirm this. Using Mozilla/5.0 (Windows; U; Windows NT 5.1; da- DK; rv:1.7.8) Gecko/20050511 Firefox/1.0.4. Running Windows XP. This is a problem for JavaScript programs that uses ctrl-clicking for selecting items (trying to imitate a windows GUI).
Comment 6•19 years ago
|
||
It appears that this bug has been narrowed down to an extension. However, can someone please test again with a clean install of the latest nightly just to be sure?
Comment 7•19 years ago
|
||
WFM with current nightly trunk build.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•