Bug 18094 - Clicking drop-down box redirects to new page because of the unclosed anchor element
Summary: Clicking drop-down box redirects to new page because of the unclosed anchor e...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2008-03-25 17:46 PDT by jasneet
Modified: 2022-08-09 11:46 PDT (History)
9 users (show)

See Also:


Attachments
reduction (312 bytes, text/html)
2008-03-25 17:46 PDT, jasneet
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jasneet 2008-03-25 17:46:13 PDT
I Steps:
Go to 
the attached reduction

II Issue:
Click on drop-down box. It redirects to new page because of the unclosed anchor element.

III Conclusion:
The issue is because of the anchor tag.
The way Safari/Opera interpret the anchor element <a href="http://www.apple.com"/> is different from FF/IE.If we have a closing anchor tag, everything works fine. The above style of anchoring gets applied to the whole table below that anchor tag.

Opera gets redirected to that page with a single click in the whole table area.
Safari gets redirected with a single click in the table area except for the selection box. It takes you to the linked page after a couple of clicks on the selection box. First try selecting and then click again on the text or the arrow of the selection box.
FF3b4/IE7 don't redirect to the page. They simply ignore that anchor element.

IV Other browsers:
IE7: ok
FF3: ok
Opera9.24: not ok

V Nightly tested: 31238
Comment 1 jasneet 2008-03-25 17:46:34 PDT
Created attachment 20064 [details]
reduction
Comment 2 Robert Blaut 2008-06-02 11:31:33 PDT
The WebKit rendering way is consistent with HTML5 parser: http://james.html5.org/cgi-bin/parsetree/parsetree.py?uri=https%3A%2F%2Fbugs.webkit.org%2Fattachment.cgi%3Fid%3D20064 and HTML5 spec: http://www.whatwg.org/specs/web-apps/current-work/

So in my opinion the report is not bug. Any other comments on this issue?
Comment 3 Ahmad Saleem 2022-08-09 09:14:16 PDT
I am able to reproduce this bug and observed following behavior across all browsers:

*** Safari 15.6 on macOS 12.5 ***

1) Clicking on table any place beside drop-down will lead to apple.com
2) Clicking on drop-down and then selecting will not do anything

NOTE - Safari allow you to open drop-down and select and do nothing or don't navigate you to apple.com

*** Firefox Nightly 105 ***

1) Clicking on table any place beside drop-down will lead to apple.com
2) Clicking on drop-down and then depending on the hit testing (if you click near the drop and drop list, it will instantly lead you to apple.com but if you click on drop-down list and then it views the list then it will lead you before even select) and it varies and some time you can select like "Safari" and then it leads you to "apple.com"

In short - it does lead you to apple.com upon clicking drop-down or selecting value from drop-down

***

1) Clicking on table any place beside drop-down will lead to apple.com
2) Single click on "drop-down" will lead you to apple.com

_______

I am not sure on web-spec but I think we need to align this with other browsers or raise it as "WHATWG" to clarify further (if we don't have any web-spec to dictate this). Marking this as "New" now. Thanks!
Comment 4 Ryosuke Niwa 2022-08-09 10:50:48 PDT
This is working now.
Comment 5 Ahmad Saleem 2022-08-09 11:44:23 PDT
rniwa@webkit.org - are you testing on Webkit ToT? Because I am getting same behavior as Safari 15.6 on Safari Technical Preview 150. Is it something where Firefox and Chrome incorrect? Just wanted to ask for my own learning.
Comment 6 Ryosuke Niwa 2022-08-09 11:46:03 PDT
(In reply to Ahmad Saleem from comment #5)
> rniwa@webkit.org - are you testing on Webkit ToT? Because I am getting same
> behavior as Safari 15.6 on Safari Technical Preview 150. Is it something
> where Firefox and Chrome incorrect? Just wanted to ask for my own learning.

Yeah, and that current behavior of Safari is correct. The original bug was that when you click on drop-down box (select element), we'd erroneously navigate the page to apple.com due to the unclosed a tag. We don't have that behavior anymore so this is fixed :)