Bug 136348

Summary: konqueror loops on javascript dialogs on http://atilf.atilf.fr/ whereas firefox behaves smoothly
Product: [Applications] konqueror Reporter: Thierry Vignaud <tvignaud>
Component: khtml formsAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: maksim
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thierry Vignaud 2006-10-26 17:50:03 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Mandriva RPMs
Compiler:          gcc-4.4.1 
OS:                Linux

When one enables javavscript in konqueror and browse http://atilf.atilf.fr/, konqueror loops on javascript dialogs there whereas firefox behaves smoothly.
Comment 1 Maksim Orlovich 2006-10-26 18:01:19 UTC
Which JavaScript dialogs? Please provide an exact sequence of steps to see the problem..
Comment 2 Thierry Vignaud 2006-10-26 18:06:38 UTC
Oops sorry.
Click on "Entrez dans le TLF". You're then redirected into http://atilf.atilf.fr/dendien/scripts/tlfiv4/showps.exe?p=combi.htm;java=no;

There, konqueror'll loops on javascript dialog until another konq window is opened from the menu and javascript is disabled on that domain.

Btw the bug has been seen by Laurent Montel too.
Comment 3 Maksim Orlovich 2006-10-26 18:17:27 UTC
Ah, I see one problem: when clicking on the lineedit, right?
Comment 4 Thierry Vignaud 2006-10-26 18:28:59 UTC
yes on the entries below "Utilisez les boutons pour faire votre saisie"
Comment 5 Maksim Orlovich 2006-10-26 18:42:49 UTC
OK, so more of focus suckage -- blur is pretty broken...
Comment 6 Maksim Orlovich 2006-10-28 21:46:07 UTC
SVN commit 599852 by orlovich:

Actually blur Qt focus when we're asked to.
Fixes #12691, and makes #136348 infinitely 
better --- we do not loop infinitely there, 
but still generate the popup twice, as 
the mousedown code re-focuses the item that 
blur blurred... Not sure how to fix that yet..

BUG:12691
CCBUG:136348


 M  +5 -1      dom_docimpl.cpp  


--- branches/KDE/3.5/kdelibs/khtml/xml/dom_docimpl.cpp #599851:599852
@@ -2272,9 +2272,13 @@
                         static_cast<RenderWidget*>(m_focusNode->renderer())->widget()->setFocus();
                 }
             }
+        } else {
+            //We're blurring. Better clear the Qt focus/give it to the view...
+            if (view())
+                view()->setFocus();
         }
 
-        updateRendering();
+        updateRendering(); 
     }
 }
 
Comment 7 Maksim Orlovich 2008-01-31 20:35:52 UTC
Fully on in post-4.0.1..