(*** This bug was imported into bugs.kde.org ***) Package: konqueror Version: KDE 3.0.1 Severity: normal Installed from: Compiled From Sources Compiler: gcc 3.1 OS: Linux OS/Compiler notes: Not Specified Some web pages fail to render correctly if something like: window.history.forward(); is the first line in a javascript when there are no more pages to go forward to. The problem is in konqueror itself in konq_view.cc (see patch below.) Basically stop() gets called before we check if the history index is even valid; this breaks many pages where history.forward() is called as a preventative measure. Other browsers all (correctly) ignore this. Example page (hangs during rendering on all KDE 3.x versions plus current CVS): <HTML><HEAD> <SCRIPT Language="javascript"> javascript:window.history.forward(1); </SCRIPT> </HEAD><BODY> Testing! </BODY></HTML> Patch to fix this: --- /net/cvs.kde.org/kdebase/konqueror/konq_view.cc.orig Thu Jun 20 16:02:45 2002 +++ /net/cvs.kde.org/kdebase/konqueror/konq_view.cc Thu Jun 20 16:05:24 2002 @@ -6248 +6246 @@ return; } - stop(); - int newPos = m_lstHistory.at() + steps; #ifdef DEBUG_HISTORY kdDebug(1202) << "go : steps=" << steps @@ -6366 +6348 @@ if( newPos < 0 || (uint)newPos >= m_lstHistory.count() ) return; + stop(); + // Yay we can move there without a loop ! HistoryEntry *currentHistoryEntry = m_lstHistory.at( newPos ); // sets current item (Submitted via bugs.kde.org)
Patch was perfectly correct! Too bad I didn't see it before 02-Oct, when I fixed this exact same bug... revision 1.313 date: 2002/10/02 14:48:13; author: faure; state: Exp; lines: +6 -3 Fixed window.history.forward(1) (on a new window, pretty stupid thing to do), by moving the stop() call under the sanity check for the argument. This fixes the login window on www.hsbc.ca. George said ok :) ============================================================================= Please send patches to kfm-devel in the future - I read this with more priority than the huge buglist...