Bug 97749 - Middle clicking outside of a focused form textbox still pastes (and strats scrolling)
Summary: Middle clicking outside of a focused form textbox still pastes (and strats sc...
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml forms (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-23 23:24 UTC by Sean Lynch
Modified: 2005-02-02 23:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Testcase (717 bytes, text/html)
2005-01-23 23:25 UTC, Sean Lynch
Details

Note You need to log in before you can comment on or make changes to this bug.
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