Summary: | Cannot move back to pages which were left using window.location | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Antiphon <antiphon99> |
Component: | kjs | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 4.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Antiphon
2003-03-21 12:15:06 UTC
Oops, should be moved to kjs OK I see the bug now. I thought "can't go back" was due to a re-redirection. No, it's just that "Back" is disabled ;) Subject: KDE_3_1_BRANCH: kdelibs/khtml/ecma CVS commit by faure: Don't lock history when executing window.location='...', one wants to be able to go back. Only location.replace locks the history. CCMAIL: 56204-done@bugs.kde.org M +1 -1 kjs_html.cpp 1.224.2.10 M +1 -1 kjs_window.cpp 1.299.2.13 M +1 -1 kjs_window.h 1.88.2.4 --- kdelibs/khtml/ecma/kjs_html.cpp #1.224.2.9:1.224.2.10 @@ -419,5 +419,5 @@ void KJS::HTMLDocument::putValueProperty KHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view(); if ( view ) - Window::retrieveWindow(view->part())->goURL(exec, value.toString(exec).qstring()); + Window::retrieveWindow(view->part())->goURL(exec, value.toString(exec).qstring(), false /*don't lock history*/); break; } --- kdelibs/khtml/ecma/kjs_window.cpp #1.299.2.12:1.299.2.13 @@ -704,5 +704,5 @@ void Window::put(ExecState* exec, const } case _Location: - goURL(exec, value.toString(exec).qstring()); + goURL(exec, value.toString(exec).qstring(), false /*don't lock history*/); return; case Onabort: --- kdelibs/khtml/ecma/kjs_window.h #1.88.2.3:1.88.2.4 @@ -94,5 +94,5 @@ namespace KJS { void delayedGoHistory(int steps); void goHistory(int steps); - void goURL(ExecState* exec, const QString& url, bool lockHistory = true); + void goURL(ExecState* exec, const QString& url, bool lockHistory); Value openWindow(ExecState *exec, const List &args); void resizeTo(QWidget* tl, int width, int height); David Faure wrote:
> Only location.replace locks the history.
What is the rationale behind this? Why shouldn't location.replace update the history? I was about to report it as bug but found this report. The script used by most sites here as a generic "JavaScript jump" script uses location.replace(url) if IE is detected, and location.href = url otherwise. Is there a better suggestion?
|