Closed Bug 48786 Opened 24 years ago Closed 23 years ago

Middle click pasting in textfield inserts at wrong point within field


(Core :: DOM: Editor, defect, P3)






(Reporter: paul, Assigned: kinmoz)



(Whiteboard: [need info])


(3 files)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.15 i686; en-US; m18) Gecko/20000812
BuildID:    2000081209

Pasting into a textfield with the middle mouse button often results in the text
being pasted into the line above where you want it.

Reproducible: Always
Steps to Reproduce:
1.Enter a longish line of text in a textfield ('This is a fairly long line')
2.Hit enter and enter a small amount of text in the next line ('Short bit')
3.Select some text from a terminal window ('Pasted text')
4.Position the pointer just after the 'Short bit') in the textfield
5.Paste with middle click of mouse

Actual Results:
This is a fPasted textairly long line
Short bit

Expected Results:
This is a fairly long line
Short bit Pasted text
Actually, I can't reproduce this. Sujay: known problem? Can you see this?
Assignee: trudelle → beppe
Component: XP Toolkit/Widgets → Editor
QA Contact: jrgm → sujay
on win98, I can't reproduce this either, Sujay, can you please test this on 
linux and mac
Just letting you know that this still happens consistantly for me.
Linux, 2000081320
To recap (in case I wasn't clear before).
1)Type a line of stuff in a textfield
2)Hit enter at the end of the line
3)Use your mouse to select some text from another window (eg a terminal).
4)Reposition your mouse pointer on the empty line (so it looks like a pointer,
not an I beam) and click the middle button to paste.

Note that I am not left clicking anywhere in the text box between steps 3 and 4.
The flashing cursor is still at the beginning of the blank line from step 2. I
am using 'Focus follows pointer' in X.

Note that this is specifically to do with the type of pasting typically achieved
with a single click of the middle mouse button under X on linux and is probably
completely unrelated to right-click paste or click-menubar-paste under other OSs
that don't use X (or using those methods on OSs that do also cater for
middle-click pasting).
And by 'textfield' I in fact mean an html textarea in a form in case that was
adding any confusion.
confirming this bug. It's annoyed me for ages.

Best step to repro is to write several lines (5...6) (with linefeeds) for
instance in a comment form like this.
Then copy some text by only selecting it
It is now on X clipboard
Then write one more line in comment
When you now middle click to paste, the paste is inserted whereever the
arrow-cursor is positioned, and NOT (as expected) where the blinking insertion
point is.

This bug has  been commented on in a few other bugs i've seen, but i haven't
seen it filed as a separate bug.

Tested w/M18 linux 081420
Ever confirmed: true
I can't reproduce this.....
asking kin if he can reproduce this one.
Assignee: beppe → kin
Accepting bug.
Keywords: correctness
Target Milestone: --- → M19
Whiteboard: [need info]
reporter: is this still an issue, can you try this again using a recent build
kin: can you dup this?
This is still a problem for me 2000091908.
*** Bug 55505 has been marked as a duplicate of this bug. ***
the problem seems to be that a middle-mouse click also sets a new insertion
point, instead of honoring existing position of caret.
No, no, (imho) no! Middle clicking should set the insertion point (that is the
way it behaves in every other app I've ever used).
The problem is that Moz isn't setting the insertion point to the correct place.
I am going to attach 3 pngs, one which marks where I am about to click, the next
is the (bad) result gained from that click and the third shows where I think the
pasted text should turn up (which I did manually, without pasting).
Target Milestone: M19 → Future
*** Bug 58707 has been marked as a duplicate of this bug. ***
I am able to see this bug consistently in a CVS build from 10/31/2000 on
PC/Linux; I've seen it at least since M17.  It's really annoying.

This bug is marked [need info]; what info is needed?

BTW, I suspect this may be related to bug #53610.

I'm still seeing incorrect (although slightly different) behavior when I follow
the initial reporter's instructions.  I now see the text being inserted after
'This is a fairly long line' instead of in the middle of it.

I notice that if I right-click slightly lower than I normally would, the paste
will often go to the right spot.  However, if I left-click there, the cursor is
positioned correctly.  Strange.
FYI, still seeing this bug on 2001032614.
*** Bug 88374 has been marked as a duplicate of this bug. ***
*** Bug 88805 has been marked as a duplicate of this bug. ***
*** Bug 70698 has been marked as a duplicate of this bug. ***
See also bug 82826, reported imagemap coords wrong if middle-clicked.
See also bug 57913, textarea pasting [with middle mouse button] into the middle
of blank lines is wonky.

*** This bug has been marked as a duplicate of 57913 ***
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.