Version: (using KDE KDE 3.1) Installed from: Mandrake RPMs OS: Linux The following javascript causes an endless string on javascript alerts which quickly crashes konqueror. This is probably actually 2 bugs. One being the infinite alerts that keep stealing focus so you can't close the window (maybe limit the max number of alerts). The second is that location.href is not updated correctly onunload, so instead of going to the new location as intended, it just instantly refreshes. <html> <head> <script> var url = 'http://www.yahoo.com'; function setNewUrl(){ window.location.href = url; //window.location.replace(url); alert(window.location.href); } </script> </head> <body onunload="setNewUrl();"> <a href="#" onclick="url='http://www.yahoo.com/';return false;">update url</a>
Created attachment 11680 [details] Testcase attached Cannot reproduce (trunk 431768 and 3.4.1)
Argh, actually it's easy to reproduce. #6 0x00000040 in ?? () #7 0x043348c9 in QApplication::internalNotify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #8 0x04334a5a in QApplication::notify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #9 0x0097e12c in KApplication::notify (this=0xbff38a80, receiver=0x9a07810, event=0xbff369c0) at kapplication.cpp:549 #10 0x04328c3e in QEventLoop::activateTimers () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #11 0x042e4c1e in QEventLoop::processEvents () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #12 0x04349ef5 in QEventLoop::enterLoop () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #13 0x04333af1 in QApplication::enter_loop () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #14 0x04514170 in QDialog::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #15 0x00f0bb5c in KMessageBox::createKMessageBox (dialog=0x9a076e8, icon=<incomplete type>, text=@0xbff36f80, strlist=@0xbff36e40, ask=@0x47f1780, checkboxReturn=0x0, options=1, details=@0x47f1780, notifyType=Critical) at kmessagebox.cpp:309 #16 0x00f0b2c9 in KMessageBox::createKMessageBox (dialog=0x9a076e8, icon=Critical, text=@0xbff36f80, strlist=@0xbff36e40, ask=@0x47f1780, checkboxReturn=0x0, options=1, details=@0x47f1780) at kmessagebox.cpp:145 #17 0x00f0d356 in KMessageBox::errorListWId (parent_id=44078782, text=@0xbff36f80, strlist=@0xbff36e40, caption=@0xbff36fe0, options=1) at kmessagebox.cpp:772 #18 0x00f0d0fb in KMessageBox::error (parent=0x9a67678, text=@0xbff36f80, caption=@0xbff36fe0, options=1) at kmessagebox.cpp:737 #19 0x07b9a49f in KJS::WindowFunc::tryCall (this=0x978bc58, exec=0xbff373c0, thisObj=@0xbff37190, args=@0xbff371e0) at kjs_window.cpp:1504 #20 0x07b43671 in KJS::DOMFunction::call (this=0x978bc58, exec=0xbff373c0, thisObj=@0xbff37190, args=@0xbff371e0) at kjs_binding.cpp:107 #21 0x0733f24c in KJS::Object::call (this=0xbff371c0, exec=0xbff373c0, thisObj=@0xbff37190, args=@0xbff371e0) at object.cpp:70 #22 0x07303934 in KJS::FunctionCallNode::evaluate (this=0x956e128, exec=0xbff373c0) at nodes.cpp:870 #23 0x07308f4e in KJS::ExprStatementNode::execute (this=0x9534748, exec=0xbff373c0) at nodes.cpp:1969 #24 0x0730f4dc in KJS::SourceElementsNode::execute (this=0x956d780, exec=0xbff373c0) at nodes.cpp:3091 #25 0x07308da6 in KJS::BlockNode::execute (this=0x9a11ae0, exec=0xbff373c0) at nodes.cpp:1931
The refresh is because we handled href="#" improperly. Now we fixed that, and do The Right Thing(tm) --- nothing. however, reload does trigger the chain of alerts. fun
OK, I mostly understand what's happening, but it'll be very hard to fix :-(. might be a 4.0 item and not 3.5.1 :-(
bug #74569 is partly underlied by the same issue
*** Bug 105873 has been marked as a duplicate of this bug. ***
Confirmed in trunk r793971. At least parts of this bug are still present. Maybe it should be renamed to make it match the problem behaviour?
can reproduce with svn trunk r793457.
Here using: Qt: 4.4.3 + qt-copy-patches-889120 KDE: 4.1.87 (KDE 4.1.87 (KDE 4.2 >= 20090101)) kdelibs svn rev. 905636 / kdebase svn rev. 905636 on ArchLinux x86_64 - Kernel 2.6.27.10 The behaviour is the same in Konq4.2 as in Firefox3, clicking in the link does nothing (no redirection, no location bar changes, no unlimited alerts). Anyone else can confirm this ?
Yes I can confirm the same thing as #9 running kde 3.5 in debian lenny
and it is kde 3.5.9/3.5.10
Updating status: Qt: 4.5.1 (qt-copy 971295) KDE: 4.2.88 (KDE 4.2.88 (KDE 4.3 >= 20090527)) kdelibs svn rev. 975695 / kdebase svn rev. 975695 on ArchLinux i686 - Kernel 2.6.29.4 Behaviour is still the same as comment 9.
Same behavior of comment #9 here. KDE Version: 4.2.88 (KDE 4.2.88 (KDE 4.3 >= 20090527)) Qt Version: 4.5.1 Gentoo Linux 2.6.29-tuxonice-r1 i686
Marking as WORKSFORME