Setting window.location.href may throw

RESOLVED DUPLICATE of bug 532602

Status

()

--
major
RESOLVED DUPLICATE of bug 532602
9 years ago
9 years ago

People

(Reporter: bugzilla33, Unassigned)

Tracking

1.9.2 Branch
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

9 years ago
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
(Reporter)

Comment 1

9 years ago
Created attachment 414697 [details]
source
(Reporter)

Updated

9 years ago
Version: unspecified → 3.6 Branch
(Reporter)

Updated

9 years ago
Component: General → Layout: Images
Product: Firefox → Core
Version: 3.6 Branch → 1.9.2 Branch
(Reporter)

Updated

9 years ago
Component: Layout: Images → Event Handling
QA Contact: general → events
Created attachment 415600 [details]
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?
(Reporter)

Comment 5

9 years ago
>> 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.
(Reporter)

Comment 7

9 years ago
>> my question was about location.href behavior in general
https://bugzilla.mozilla.org/show_bug.cgi?id=532602
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 532602
You need to log in before you can comment on or make changes to this bug.