Closed Bug 5044 Opened 26 years ago Closed 25 years ago

Window.history.length gives result 1 all the time.

Categories

(SeaMonkey :: UI Design, defect, P2)

x86
Windows 95

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: desale, Assigned: radha)

Details

Window.history.length gives result 1 all the time. Even if you visit other pages and try to increase histiry entries, still it gives history array length 1 only. Providing information to simulate the problem. Product: Seamonkey.[apprunner] Build Date: 04/13/99 Platform: PC [Windows-95] Steps to Reproduce: 1] Please copy the code I'm providing. Save as HTML file. 2] Open this HTML file in apprunner. 3] You will find one button called "Check History Length". 4] Click this button. [Here Result text Box shows length of history array as 1. It is fine here.] 5] Now visit 2 to 3 other sites, whichever you want. 6] Again open same HTML file which I provided. [By this time history array should have got some new entries.] 7] Click button "Check History Length". Expected Results: After Clicking button "Check History Length" second time, the result Text box should show length of history array greater than 1. Actual Results: Result Text Box still shows length of history array as 1. Code: <html> <head> <title>History.Length</title> </head> <script> <!-- function report(text) { var value=document.workform.result.value; var msg= value+ " " +text; document.workform.result.value=msg; } //--> </script> <body > <form name="workform" > <input type="button" value="Check History Length" name="Reset2" onClick="report(window.history.length);"><br> Result Text Box<INPUT TYPE=text NAME="result" SIZE=80> <input type="reset" value="Reset"> </form> </body> </html>
History.current could be accessed perfectly, but history.next and history.previous also don't work. I'm not entering seperate bugs for history.next and history.previous since all are realted.
Assignee: vidur → joki
Assignee: joki → trudelle
So from some quick testing this is what seems to be happening. The javascript window.history just maps back to the webshell's internal history list which seems to be misbehaving in apprunner. Clicking on button in the apprunner chrome which bring you to a new page updates the webshell's history length. So does clicking on links on webpages. However, entering a URL into the location bar does *not* update the webshell history length. I don't know why not. The is only true of apprunner. Works fine in viewer. Giving to apprunner group for reassignment.
Assignee: trudelle → don
Component: DOM Level 0 → Apprunner
AppRunner is Don, changing component field and reassigning.
Assignee: don → radha
Component: Apprunner → XPApps
Priority: P3 → P2
Target Milestone: M6
Re-assigned to radha.
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
This got fixed in the recent slew of sessiion history fixes. The attached test return proper result as and when you visit pages. either by clicking on links or typing in URL in the command line. I also modified the script to return window.history.next and window.history.previous an dit seems to work. Marking fixed. Please verify
Status: RESOLVED → VERIFIED
Verified, and everything is working fine now.
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.