If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Setting window.location.href may throw

RESOLVED DUPLICATE of bug 532602

Status

()

Core
DOM
--
major
RESOLVED DUPLICATE of bug 532602
8 years ago
8 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

8 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

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

Updated

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

Updated

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

Updated

8 years ago
Component: Layout: Images → Event Handling
QA Contact: general → events

Comment 2

8 years ago
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.

Updated

8 years ago
Summary: preventDefault() failures with firefox alert notification → Setting window.location.href may throw

Updated

8 years ago
Component: Event Handling → DOM
QA Contact: events → general

Updated

8 years ago
Attachment #415600 - Attachment description: modifie testcase → modified testcase

Comment 3

8 years ago
Maybe we shouldn't throw.
Maybe.  What does HTML5 say?  What do other browsers do?
(Reporter)

Comment 5

8 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

8 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: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 532602
You need to log in before you can comment on or make changes to this bug.