javascript history doesn't works ok if you returns using back button

RESOLVED WORKSFORME

Status

()

Firefox
General
--
major
RESOLVED WORKSFORME
15 years ago
15 years ago

People

(Reporter: NetVicious, Assigned: Blake Ross)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1

If you returns to a page with a button (onclick='history.go(-1)') using back
button, if you clicks on this button you will get one javascript error.

Reproducible: Always

Steps to Reproduce:
1. Send a page with a form
2. If all it's ok you gets a page with a confirmation dialog (Yes/No) created
with javascript. No button haves onclick="history.go(-1)" or one javascript
function making the same.
3. Click on yes button, you go to another page.
4. Click back, you will be on a page with the NO button with the history.go(-1).
5. Click on No button.
6. You will get one javascript error saying history object have no properties.

Actual Results:  
Javascript error and no back jump.

Expected Results:  
Go to previous page.

Sorry, I couldn't post the html pages I'm using, it a private work :-(
(Reporter)

Comment 1

15 years ago
On a Windows box with Firebird/0.6 works correctly.

Comment 2

15 years ago
Well, perhaps it would be possible to produce a simplified testcase out of your
pages you're using? This would speed up the work on this bug...
(Reporter)

Comment 3

15 years ago
Created attachment 129292 [details]
Page 1 of testcase
(Reporter)

Comment 4

15 years ago
Created attachment 129293 [details]
Page 2 of testcase
(Reporter)

Comment 5

15 years ago
Created attachment 129294 [details]
Page 3 of testcase
(Reporter)

Comment 6

15 years ago
Here it's a little testcase.

My pages are all php files.

While the tested pages I get one error on the 3rd page when you clicks on
javascript:history.back().

The bug occurs with history.back() and with history.go(-1), this bug works on
Firebird 0.6 under Windows XP Proff

It would be a Javascript bug.

Comment 7

15 years ago
I've also had trouble with the window.history object in Mozilla 1.5a . 
Investigation using the DOM inspector shows that for some pages the JavaScript
target->defaultView->history object is null (though for other pages the value is
valid).  This seems to depend on the page contents - if a page has a null
history, then almost identical pages from other servers will also have a null
history.

One page with the problem is http://www.sisyphus.demon.co.uk/POTOC/ .  It works
with earlier versions of Mozilla (and also with Opera and IE).

Comment 8

15 years ago
I have found the same to be true, I am running Firebird 0.6.1 on Windows XP and
I have the exact same problem.  I don't even have a form basically if you load
up a page then naviate to another page which then has a link pointing either to
javascript:history.back() or javascript:history.go(-1) either one will work
ONCE, then if you click on it and go back to the main page, if you navigate to
any other page from this point on that has a link to either of the above
functions without closing the browser and re-opening it will do nothing, and the
js console shows the history object as being null from this point on.

Comment 9

15 years ago
if you want to test go to http://www.boxxtech.com/
click on "sales inquiry" or "sales" then click the white back arrow in the 
upper left corner, click on "sales" or "sales inquiry" again and this time if 
you try to use the back button it doesn't work anymore, nor anywhere else on 
the site till you re-open the browser

Comment 10

15 years ago
*** Bug 216697 has been marked as a duplicate of this bug. ***

Comment 11

15 years ago
re: comment number 9.  Works for me using both the linux and windows 20030830
build.  Guys, please re-test and post your results using this build (or later).

Comment 12

15 years ago
Using the 0901 build I am not having the problem anymore,
I tried it up next to the standard 0.6.1 build I had,
one works the other doesn't so it appears to me to be fixed

Aaron
(Reporter)

Comment 13

15 years ago
Ok.

Tested with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030902
Firebird/0.6.1+

Now works for me. Thanks for all the developers ;-)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → WORKSFORME

Comment 14

15 years ago
*** Bug 215812 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.