Open
Bug 502615
Opened 16 years ago
Updated 1 year ago
Inconsistent behavior of JS
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: samliberman, Unassigned)
Details
(Keywords: testcase, Whiteboard: DUPEME, domcore-bugbash-triaged)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)
If you navigate to page with following source:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
</head>
<body>
<script type="text/javascript" language="javascript">
function redirect(){
window.location = "http://www.google.com";
}
setTimeout('redirect()', 10);
</script>
</body>
</html>
it will redirect you to google.com if you hit back button it will allow you to stay on this page. However if you add:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
</head>
<body>
<script type="text/javascript" language="javascript">
function redirect(){
window.location = "http://www.google.com";
}
alert("Test");
setTimeout('redirect()', 10);
</script>
</body>
</html>
it will redirect you even if you hit back button.
Reproducible: Always
Steps to Reproduce:
1. Navigate to such page.
2. Hit back button
3. See the difference
Actual Results:
You stay on your page and not redirected in case of no alert
Expected Results:
Redirect to google.com every time.
Comment 1•16 years ago
|
||
Comment 2•16 years ago
|
||
hmmmm...
Comment 3•16 years ago
|
||
sorry for the spam..
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Summary: Inconsisten behavior of JS → Inconsistent behavior of JS
Comment 4•16 years ago
|
||
Not a JS engine bug, Tyler please note for future reference the issue of page navigation, scripted redirect via location setting, setTimeout, alert: these spell D-O-M.
/be
Assignee: general → nobody
Component: JavaScript Engine → DOM
QA Contact: general → general
Whiteboard: DUPEME
Comment 5•16 years ago
|
||
Sorry brendan, will remember. Would this make this NEW?
Comment 6•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•3 years ago
|
Severity: normal → S3
Comment 7•1 year ago
|
||
[domcore-bugbash-triaged] Doing domcore random bug triage - still valid. A variation of the event loop spinning problem.
Whiteboard: DUPEME → DUPEME, domcore-bugbash-triaged
You need to log in
before you can comment on or make changes to this bug.
Description
•