Middle-click on scrollbar pastes text instead of jumping.

Bug #62071 reported by Karim Naqvi
6
Affects Status Importance Assigned to Milestone
Mozilla Thunderbird
Fix Released
Critical
thunderbird (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I just upgraded to thunderbird 1.5.0.7 under breezy. This behaviour is, I believe, new with this upgrade. I've never noticed it before, and it would be quite obtrusive to have random bits of text inserted into outgoing email.

Steps to reproduce:
1. start thunderbird
2. compose email, add enough lines so the scroll bar appears.
3. select text from any application by dragging the mouse. The paste buffer now has that text in it.
4. in the email composition window, middle click the scroll bar. This is *supposed* to quickly jump to some place in the outgoing email message.
5. the result instead is the selected text is pasted into the email message.

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

I'm seeing this as well. I tried some older builds, and this bug is _not_
present in 2001-01-28-06, but _is_ present in 2001-01-28-21. Not really sure
what got checked in in there that could have caused this....

Revision history for this message
In , Mar-garina (mar-garina) wrote :

Also please change platform 'All', it happens in windows (on drag and drop) as well.

Revision history for this message
In , Tpreston (tpreston) wrote :

Per mar garina's comments, changing to all

Revision history for this message
In , Francisco (fleona) wrote :

I think this is dupe of bug 48786. If you dont agree, send flames to /dev/null
:) and reopen it

*** This bug has been marked as a duplicate of 48786 ***

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

reopening. They may be related, but I doubt it.

Revision history for this message
In , Brade (brade) wrote :

-->kin

Revision history for this message
In , Brade (brade) wrote :

*** Bug 82513 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Brade (brade) wrote :

*** Bug 89238 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Kinmoz (kinmoz) wrote :

Bulk move of mozilla1.0 bugs to mozilla.1.0.1. I will try to pull some of these
back in if I can.

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

*** Bug 127576 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

Note bug 36019. The fix for that should probably be applied here.

Revision history for this message
In , Carey-evans (carey-evans) wrote :

I see this when pasting or drag-and-dropping in the trough of the scrollbar, not
the arrow. When pasting, the textarea does reposition correctly, in addition to
pasting the text.

This is what bug 127576 is reporting, which is slightly different to the
original bug.

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

*** Bug 142041 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

*** Bug 147524 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Ajschult (ajschult) wrote :

*** Bug 150493 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

*** Bug 162338 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

*** Bug 149252 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Kherron+mozilla (kherron+mozilla) wrote :

*** Bug 162337 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Brant (brant) wrote :

By the definitions on <http://bugzilla.mozilla.org/bug_status.html#severity> and
<http://bugzilla.mozilla.org/enter_bug.cgi?format=guided>, crashing and dataloss
bugs are of critical or possibly higher severity. Only changing open bugs to
minimize unnecessary spam. Keywords to trigger this would be crash, topcrash,
topcrash+, zt4newcrash, dataloss.

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

This worksforme now... is anyone still seeing this?

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

To comment 20:
brade resolved bug 82513 as a dup, and I still see that one.

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

*** Bug 211237 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

*** Bug 179536 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

*** Bug 213041 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

*** Bug 218442 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Ajschult (ajschult) wrote :

*** Bug 219121 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

this can also cause a freeze:

open cnn.com and "edit page".
In composer: shift to html source and select one word
Shift back to normal view and middle mouse click on scrollbar, below slider:
Result: 100% cpu usage and freeze. mozilla-bin process has to be killed to be
used again.

testing with a current CVS build, Linux. Adding hang kw

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

updating summary to what this bug is actually about (bug 82513)

Revision history for this message
In , Akkana Peck (akkzilla) wrote :

(Thanks for the clear summary, R.K.Aa)

What I'm seeing: the scrollbar jumps, as expected, but then the paste happens
anyway.

I thought initially that this probably meant that PreventDefault wasn't being
called on the mouse button event. But I tried a simple fix for that, and when
it didn't work I poked around a bit to find out why, and here's the scoop:

So then I suspected that the scroll was being handled by
nsSliderFrame::MouseDown ... which in fact does not call PreventDefault, but
adding it doesn't help. The paste is being handled by
nsTextEditorMouseListener::MouseClick (which doesn't check for
GetPreventDefault, but adding that doesn't help either). See the problem?
MouseDown is one event, and MouseClick is a different event, so handling the
first doesn't prevent the second from happening.

Moving the editor's middleclick handling from MouseClick to MouseDown cures the
problem, but that's not the right solution: it really should be handled on
click, not down, and I suspect that it's only using mouse down in layout because
it was a convenience since the twips calculation code that handles dragging was
already in that routine. Anyway, factoring out the relevant code isn't difficult.

Unfortunately, it turns out that nsSliderFrame::MouseDown is not in fact where
the scroll is being handled. There's probably another routine somewhere that
does the same thing, in the same way, also on MouseDown instead of MouseClick;
and if we could find that routine, we could move it to MouseClick instead.
Anybody else have better luck with finding this than I'm having?

Revision history for this message
In , Evert-verhellen-advalvas (evert-verhellen-advalvas) wrote :

I also see this problem in the Compose window (File > New > Message), not only
in the Composer window.

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

*** Bug 252561 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mats Palmgren (matspal) wrote :

Created attachment 194925
Patch rev. 1

Revision history for this message
In , Mats Palmgren (matspal) wrote :

Created attachment 194926
Patch rev. 1 (diff -w)

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

Hmm... So right now preventing the default action of a mouseup does not prevent
the click event? And this is what's being changed, basically?

Put another way, is there a reason the scrollbar needs to prevent the mouseup,
not the click?

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

I probably don't understand this but just to make sure:
it's the pasting that should be prevented. A mouseup should stop a scroll, which
should be continous while pressed. (see bug 64866)

Revision history for this message
In , Mats Palmgren (matspal) wrote :

(In reply to comment #34)
> Put another way, is there a reason the scrollbar needs to prevent the mouseup,
> not the click?

Not really, I just couldn't get preventdefault="true" to work for "click".
I have found the problem now.

Revision history for this message
In , Mats Palmgren (matspal) wrote :

Created attachment 196263
Patch rev. 2

Revision history for this message
In , Brade (brade) wrote :

Comment on attachment 196263
Patch rev. 2

Can you please fix this comment in nsEditorEventListeners.cpp:
+ //non-ui, or non-trusted event passed in. bad things.
Add a space after the '//' and remove the ','

Thanks!

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

Comment on attachment 196263
Patch rev. 2

I guess this is ok, but does this also fix native scrollbars? I don't see how
it does.

Also, things other than the scrollbar could be calling preventDefault on the
event, I think, so I wouldn't mention "scrollbar" explicitly in that comment.

Revision history for this message
In , Adam Guthrie (ispiked) wrote :

*** Bug 279003 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Adam Guthrie (ispiked) wrote :

*** Bug 232688 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mats Palmgren (matspal) wrote :

I tried reproducing this on a Mac (which I think uses native scrollbars)
using a three button mouse, but I couldn't get middle-click paste to work.
I'd appreciate if someone on a platform with native scrollbars and is using
middle-click paste could tell me if this bug can be reproduced, thanks.

Revision history for this message
In , Mats Palmgren (matspal) wrote :

Comment on attachment 196263
Patch rev. 2

Fixed the code comments as requested in comment 38 and 39.
Checked in to trunk 2005-10-08 03:08 PDT

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

Josh, Simon, is it possible to get middle-paste working on mac? And does mac
use native scrollbars (at least in Camino?).

Revision history for this message
In , Mano-mozilla (mano-mozilla) wrote :

(In reply to comment #44)
> is it possible to get middle-paste working on mac?

turning on middlemouse.paste doesn't wfm in latest mac seamonkey.

> And does mac use native scrollbars (at least in Camino?).

As long as the a native theme is used, yes.

Revision history for this message
In , Spam-minneboken (spam-minneboken) wrote :

For Mats Palmgren: Tack! It works like charm (WinXP)

In two days it will be 4 years since I filed bug 82513. It was resolved dup of
this one based on some misunderstanding. Then this one was stuck in a limbo for
years, once the initial issue was gone. Please mail me your address - I'd like
to send you a bottle of champagne if you don't mind. Or the equivalent in SEK if
you prefer (or if "systembolaget" doesn't cooperate..I mailed them for advice)

R.K.Aa. - <email address hidden>

Revision history for this message
In , Martin-gerbershagen (martin-gerbershagen) wrote :

This bug is also present in Thunderbird 1.0.7.

Revision history for this message
In , Zug-treno (zug-treno) wrote :

*** Bug 325877 has been marked as a duplicate of this bug. ***

Revision history for this message
Karim Naqvi (naqvik) wrote :

I just upgraded to thunderbird 1.5.0.7 under breezy. This behaviour is, I believe, new with this upgrade. I've never noticed it before, and it would be quite obtrusive to have random bits of text inserted into outgoing email.

Steps to reproduce:
1. start thunderbird
2. compose email, add enough lines so the scroll bar appears.
3. select text from any application by dragging the mouse. The paste buffer now has that text in it.
4. in the email composition window, middle click the scroll bar. This is *supposed* to quickly jump to some place in the outgoing email message.
5. the result instead is the selected text is pasted into the email message.

Revision history for this message
In , Vseerror (vseerror) wrote :

mats, is something not finished that the bug wasn't marked fixed after checkin?

Revision history for this message
In , Amlai (amlai) wrote :

Has a patch for this bug been checked in recently? I still experience the bug on Thunderbird 1.5.0.7. I've been applying a patch to correct for it and rebuilding the rpms for a while now. As far as I can tell, the patch lised here has no bad side effects.

Revision history for this message
John Vivirito (gnomefreak) wrote :

Is this still an issue for you? We are trying to trying sort out the older Mozilla issues and would like to know if this still happens.

Changed in mozilla-thunderbird:
assignee: nobody → mozillateam
status: Unconfirmed → Needs Info
Revision history for this message
Karim Naqvi (naqvik) wrote : Re: [Bug 62071] Re: Middle-click on scrollbar pastes text instead of jumping.

version 1.5.0.9 (20070104)It does indeed still happen, though it hasn't
been hard to avoid, probably because my email compositions tend to be
short. I'll just demonstrate here in this email, by opening the About
Thunderbird dialog and selecting the version number. OK, now I'll
middle click the scrollbar in this compose window:

Instead of jumping, it pasted the text you see at the very start of my
message. I'll just leave it there for you to wonder at until you read this.

Middle clicking on the *thumb* does not cause the problem, I must middle
click above or below the thumb.

I'll try to be useful and quickly check other apps:
- emacs: has no such problem (not surprisingly perhaps)
- gedit: no problem
- GNOME Terminal 2.14.2: no problem

Now I'll see if this can be replicated in Firefox (Mozilla/5.0 (X11; U;
Linux i686; en-US; rv:1.8.0.9) Gecko/20070126 Ubuntu/dapper-security
Firefox/1.5.0.9). I got to a website that required a login, gave the
login textfield the focus, selected text from another app, then middle
clicked the scrollbar. No problem.

Appears to be confined to some recent versions of Thunderbird and
perhaps to just ME. I hope this is helpful. I'm willing to do all I can.

-karim

John Vivirito wrote:
> Is this still an issue for you? We are trying to trying sort out the
> older Mozilla issues and would like to know if this still happens.
>
> ** Changed in: mozilla-thunderbird (Ubuntu)
> Assignee: (unassigned) => Mozilla Team
>
> ** Changed in: mozilla-thunderbird (Ubuntu)
> Status: Unconfirmed => Needs Info
>
> ** Tags added: mt-needinfo
>
>

David Farning (dfarning)
Changed in mozilla-thunderbird:
assignee: mozillateam → mozilla-bugs
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

I can confirm this issue with 1.5.0.10

I'm going to try 2.0b2 to see if this still happens.

Changed in mozilla-thunderbird:
status: Needs Info → Confirmed
Revision history for this message
Emilio Pozuelo Monfort (pochu) wrote :

2.0b2 also has this issue.

If I can provide any further info, tell me.

Regards
Emilio

Revision history for this message
In , Caillon (caillon) wrote :

Comment on attachment 196263
Patch rev. 2

Would like to get this on the branches as a stability fix as it most affects users on platforms with middle click paste, such as *nix.

Revision history for this message
In , Dveditz (dveditz) wrote :

Comment on attachment 196263
Patch rev. 2

Not approved, this patch does not apply to the 1.8 branch. Some of it applied to the 1.8.0 branch. We would need branch-appropriate patches and if they are significantly different they would need re-review before we would grant approval.

Revision history for this message
Alex Latchford (alex.latchford) wrote :

Linked upstream bug.

Changed in mozilla-thunderbird:
importance: Undecided → Low
Changed in thunderbird:
status: Unknown → Confirmed
Revision history for this message
In , Mats Palmgren (matspal) wrote :

Fixed a long time ago. The remaining question was native scrollbar on
MacOSX, but that has been removed on trunk now.

Revision history for this message
In , Amlai (amlai) wrote :

Still not fixed. I just checked w/ Thunderbird 2.0.0.7. Middle click on the scroll bar area still causes a paste.

Revision history for this message
In , Amlai (amlai) wrote :

Sorry, this was under Linux (CentOS 5), w/ version downloaded directly from mozilla.com.

Revision history for this message
In , Mats Palmgren (matspal) wrote :

It's fixed on _trunk_ which is what the Status field reflects.
We know it's not fixed on branches. Thunderbird 2.0.0.7 is built
from the 1.8 branch (you can see this in the Help->About Thunderbird as
rv:1.8.1.7).

Changed in thunderbird:
status: Confirmed → Fix Released
Revision history for this message
Micah Gersten (micahg) wrote :

This is now working in the latest Thunderbird 3 beta. Please report any other bugs you may find. You can test the latest Thunderbird 3 beta here:
https://launchpad.net/~ubuntu-mozilla-daily/+archive/ppa

A word of caution, that this is still beta software and you might encounter bugs.

affects: mozilla-thunderbird (Ubuntu) → thunderbird (Ubuntu)
Changed in thunderbird (Ubuntu):
assignee: Mozilla Bugs (mozilla-bugs) → nobody
status: Confirmed → Fix Released
Revision history for this message
Micah Gersten (micahg) wrote :

I made an error, this should remain Triaged as it has not been released in Ubuntu yet.

Changed in thunderbird (Ubuntu):
status: Fix Released → Triaged
Micah Gersten (micahg)
Changed in thunderbird:
milestone: none → 3.0
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.7 KiB)

This bug was fixed in the package thunderbird - 3.0+nobinonly-0ubuntu1

---------------
thunderbird (3.0+nobinonly-0ubuntu1) lucid; urgency=low

  * New Upstream Release 3.0 (THUNDERBIRD_3_0_RELEASE)
    - LP: #50902 - Thunderbird displays useless dialog
    - LP: #52667 - Thunderbird doesn't support RFC-2369
    - LP: #49033 - Doesn't recognize upper case extension (.JPG)
    - LP: #56465 - Per folder column widths
    - LP: #68456 - CTRL-Shift-K bound to 2 functions
    - LP: #79337 - Typo in Server Information for Add Account Wizard
    - LP: #1084 - No scroll on full headers list
    - LP: #62071 - Middle click on scrollbar pastes instead of jumping
    - LP: #119358 - Weak default authentication mode
    - LP: #120672 - No option to empty junk folder with right click
    - LP: #96566 - movemail doesn't work with default privs
    - LP: #122529 - Non-Thunderbird IMAP folders not visible to Thunderbird
    - LP: #241276 - Not able to paste image into thunderbird compose window
    - LP: #244635 - scrollboxes scroll to offset 0 when resized
    - LP: #259387 - "Edit Message as New" broken for eml messages
    - LP: #120281 - Editing a message from the drafts folder leaves line breaks
    - LP: #115484 - Dialogue boxes too large for 1024x768 resolution
    - LP: #320034 - Mail with self referencing headers breaks threading
    - LP: #160794 - shortcuts different in windows and linux
    - LP: #280987 - thunderbird keeps asking a password when working off-line
    - LP: #369150 - Thunderbird splits email addresses with non-ascii characters
                    and a comma in From: field
    - LP: #135066 - Thunderbird doesn't use Ubuntu icon theme
    - LP: #297301 - after authentication error the password is forgotten
    - LP: #487541 - thunderbird-bin crashed with SIGSEGV (AFS filesystem)
    - LP: #485224 - Thunderbird saves double attachment file name endings on
                    FAT32 and NTFS
    - LP: #482496 - When using SCIM ANTHY, autosaving fails, and then get asked
                    about sending in UTF-8

  [ Fabien Tassin <email address hidden> ]
  * Add build-depends on autoconf2.13, autotolls-dev, mozilla-devscripts
    libglib2.0-dev (>= 2.12), libstartup-notification0-dev, libbz2-dev,
    libpixman-1-dev, libdbus-1-dev (>= 1.0.0), libdbus-glib-1-dev (>= 0.60),
    libhal-dev (>= 0.5.8), libasound2-dev, libreadline5-dev | libreadline-dev,
    libkrb5-dev
  * Update build-depends minimums for libx11-dev (>= 2:1.0),
    libgtk2.0-dev (>= 2.12), zlib1g-dev (>= 1:1.2.3), libpng12-dev (>= 1.2.0),
    libjpeg62-dev (>= 6b), libcairo2-dev (>= 0.5.8), libgnome2-dev (>= 2.16),
    libgnomevfs2-dev (>= 1:2.16), libgnomeui-dev (>= 2.16),
    libnss3-dev (>= 3.12.0~1.9b3)
  * Bump standards version to 3.8.0
  * Replace ${Source-Version} by ${binary:Version} in control file
    - update debian/control
  * Bump requirement for system nspr to >= 4.8 since Mozilla bug 492464 landed
  * Bump requirement for system nss to >= 3.12.3 since Mozilla bug 485052 landed
  * Use in-source hunspell when hunspell 1.2 is not available
  * Add conditionnal support for --with-libxul-sdk controlled by
    $(USE_SYSTEM_XUL)
    - update debian/rules
  * Add p...

Read more...

Changed in thunderbird (Ubuntu):
status: Triaged → Fix Released
Changed in thunderbird:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.