Closed Bug 531240 Opened 15 years ago Closed 15 years ago

Setting window.location.href may throw

Categories

(Core :: DOM: Core & HTML, defect)

1.9.2 Branch
x86
Windows 7
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 532602

People

(Reporter: bugzilla33, Unassigned)

References

()

Details

Attachments

(2 files)

User-Agent:       Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; FDM)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2b3) Gecko/20091115 Firefox/3.6b3


preventDefault() failures with firefox alert notification


Reproducible: Always

Steps to Reproduce:

Run attachment.

Actual Results:  
Twice firefox alert notification about no associated protocol.

Expected Results:  
Only one firefox alert notification about no associated protocol, becauce preventDefault() prevents to open link in self.location
Attached file source
Version: unspecified → 3.6 Branch
Component: General → Layout: Images
Product: Firefox → Core
Version: 3.6 Branch → 1.9.2 Branch
Component: Layout: Images → Event Handling
QA Contact: general → events
Attached file modified testcase
This bug happens because setting document.getElementById('ifr').contentWindow.location.href to invalid value throws an exception, so preventDefault isn't ever called.
Summary: preventDefault() failures with firefox alert notification → Setting window.location.href may throw
Component: Event Handling → DOM
QA Contact: events → general
Attachment #415600 - Attachment description: modifie testcase → modified testcase
Maybe we shouldn't throw.
Maybe.  What does HTML5 say?  What do other browsers do?
>> What do other browsers do?
Run testcase https://bugzilla.mozilla.org/attachment.cgi?id=415600
Other browsers do not throw.
Yes, my question was about location.href behavior in general, not just on this testcase.
>> my question was about location.href behavior in general
https://bugzilla.mozilla.org/show_bug.cgi?id=532602
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: