Bug 97749

Summary: Middle clicking outside of a focused form textbox still pastes (and strats scrolling)
Product: [Applications] konqueror Reporter: Sean Lynch <techniq35>
Component: khtml formsAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: stefan.nikolaus
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Testcase

Description Sean Lynch 2005-01-23 23:24:47 UTC
Version:           3.3.91 (using KDE 3.3.91 (beta1), compiled sources)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.9-ck3

If you have text in your 'mouse select' clipboard and have a text form field selected (as to type in it), then middle click outside of it to start mouse scrolling, the text is still pasted into the text field and scrolling is activated.

This is not the case though with textareas (which in my opinion is the correct implementation).
Comment 1 Sean Lynch 2005-01-23 23:25:34 UTC
Created attachment 9239 [details]
Testcase
Comment 2 Stefan Nikolaus 2005-02-02 21:30:17 UTC
CVS commit by nikolaus: 

Avoid pasting text in a focussed text field by middle clicking outside the field.

BUG: 97749


  M +2 -1      khtmlview.cpp   1.689


--- kdelibs/khtml/khtmlview.cpp  #1.688:1.689
@@ -1233,5 +1233,6 @@ void KHTMLView::viewportMouseReleaseEven
     DOM::NodeImpl* fn = m_part->xmlDocImpl()->focusNode();
     if (fn && fn != mev.innerNode.handle() &&
-        fn->renderer() && fn->renderer()->isWidget()) {
+        fn->renderer() && fn->renderer()->isWidget() &&
+        _mouse->button() != MidButton) {
         forwardPeripheralEvent(static_cast<khtml::RenderWidget*>(fn->renderer()), _mouse, xm, ym);
     }


Comment 3 Sean Lynch 2005-02-02 23:37:35 UTC
Thank you