Closed Bug 23336 Opened 26 years ago Closed 26 years ago

Double paste on single middle mouse click

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

Sun
Solaris
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: hume, Assigned: akkzilla)

References

Details

(Whiteboard: [PDT+] requesting verification from reporter)

On Solaris 7, using KDE, pasting from a kvt or a normal XTerm, using the middle mouse button, will sometimes (not always) result in a double-paste. I can't confirm whether it happens under other window managers at the moment. It also seems to have a higher incidence in a "freshly chosen" textfield. For example, in the Bugzilla search page, pasting a random word "Contacts" into the email textfields pasted once on the first click, once on the second click, and twice on the third click. Clear the field, click on the other email box, and it can be repeated with fair regularity. I don't have access to a Win32 Mozilla at the moment, but I don't recall running into this under Windows. I recall seeing this on Solaris builds of Mozilla since about Christmas Eve.
I saw the same thing in nightly binaries on Windows NT in the last week of December, but not since, pasting into the URL-bar with ctrl-v. This has cropped up before, earlier in the fall. hume@bofh.halifax.ns.ca, what is the Build ID of the latest build you have tested on Solaris for this problem? You can find it at the right-hand end of the status bar at the bottom of the browser window: it will look something like 2000010608.
sidr@albedo.net: I completely nuked and repulled my tree this morning (2000/01/10) and the new build displays the same problem. Build ID is 1999122808.
I've been having the same problem in Linux with the Enlightenment window manager.
Component: Browser-General → Event Handling
QA Contact: nobody → janc
Looks like an event handling bug to me. Changing component and QA contact.
hume@bofh.halifax.ns.ca, the Build ID you quote is from the last week of December: is that the most recent build you have tested? dan@ss-i.com, what is the Build ID of the most recent version you have tested? The question behind both of those: is this still happening now, halfway through January?
As I said, I did a COMPLETE rm -r, re-pull, and rebuild on Jan 10. If CVS was handing out December trees on Jan 10th, then that's what I got. I also did the same on Jan 14th, and it displayed the very same problem (as well as a 1998* build-id). I'll be doing yet another complete raze-and-rebuild today.
I'm still experiencing this from a cvs build from lastnight.
I wonder if this is related to the problem being discussed in bug #23669.
Sorry about the confusion over build ID's; turns out they are meaningless for CVS builds - see bug 24353. Reading through bug 23669, "Middle-mouse paste into text field can load a URL", ASSIGNED, M14, this doesn't look like a DUP. I'm wondering if it is possible that this bug happens if the page has received focus before the middle-mouse click is done, and bug 23669 occurs otherwise, because of bug 9701, "nsWebShell Key events not working until focus set in window (TAB, PgDn, ALT+, + CTRL+)", ASSIGNED: the middle mouse paste is getting to the browser page object first, because the same click is giving focus to the page before the input, causing a page load. If so, that makes this bug the "real" bug, and bug 23669 a disguised DUP of bug 9701. Could someone please test this on a Mozilla running on X: first try the middle mouse click on a fresh browser window that hasn't had a click yet to give focus, and then on one that has? Thanks.
Summary: Double paste on single mouse click → Double paste on single middle mouse click
I've done some additional testing: tried what sidr@albedo.net suggested, and the double pasting doesn't seem to occur before giving the new browser window the focus. But it also doesn't always happen when I do give it focus. It just happens some of the time. I also noticed that the double paste doesn't seem to occur in a new text box that I haven't given focus yet, thus the reason it doesn't happen in the URL bar of a new browser. It also doesn't seem to occur if I delete all the text in a text field before I paste.
this is duplicate of bug #25284 *** This bug has been marked as a duplicate of 25284 ***
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
this is not the dup, this is the original
Status: RESOLVED → REOPENED
*** Bug 25284 has been marked as a duplicate of this bug. ***
re-assign back to joki. add pink, saari and akkana to the cc.
Assignee: nobody → joki
Status: REOPENED → NEW
Clearing DUPLICATE resolution due to reopen.
Resolution: DUPLICATE → ---
*** Bug 25924 has been marked as a duplicate of this bug. ***
This also happens to me *consistently* when pasting text into mozilla (I'm using CVS 2/9/00 12:12am). I'm using twm with XFree86 3.9.16.
*** Bug 27181 has been marked as a duplicate of this bug. ***
I know this is a little late, but I had been assuming that this bug was beta1 since double-pastes make the browser kinda hard to use, and I just found out that it's not. Adding beta1 so at least it's on the radar even if it's too late for PDT+ consideration.
Keywords: beta1
We're talking about a rather large chunk of work here. Be aware of that before you go off and just PDT+ this.
It's true that it's a lot of work. The symptom is pretty bad, though, and certainly casts doubt on our beta quality; perhaps we can find a workaround that will prevent the double paste. Some event code is incorrectly being called recursively, and maybe we can put a lock around it, or something, to prevent that temporarily. I'd like a chance to look for a workaround, if the PDT committee agrees.
Putting on the PDT- radar for beta1.
Whiteboard: [PDT-]
Pasting a URL in to the URL bar makes it get pasted twice, meaning basically that pasting in to the URL bar is broken. This would keep me from using the product. If this didn't work on windows, you would be marking it PDT+. Even if this is a large chunk of work, it needs to be fixed to have a useable product.
Whiteboard: [PDT-]
[PDT+] since this fails on Linux as well as Solaris
Whiteboard: [PDT+]
Thanks! Taking the bug, and will try to find a workaround.
Assignee: joki → akkana
Status: NEW → ASSIGNED
Disabling the ender event listener for middle mouse clicks seems to do the trick. It's superfluous anyway, since the event is handled just fine by the regular editor event listener. I rather suspect that we should disable the ender listener entirely (for all events), but that's probably risky, and disabling it just in the case(s) which cause problems is probably safer for beta. I'm testing that (1-line change) now.
Whiteboard: [PDT+] → [PDT+] testing proposed fix now
some quick background: when ender was installed as the text control, there was no automatic propogation of events from a document to an embedded webshell. thus, the ender event listener was created to take an event targeted at the text control frame and retarget it down to the webshell contained by the text control frame. thus the editor would get the event, where without this step it would not. originally, this was just done for keyboard events. as the implementation of focus mutated, at times it was required to propogate forcus events as well. to get selection-on-first-click behavior for text controls that are lazily instantiated, the mouse event code was added.
set to M14
Target Milestone: M14
spam: added self to cc list.
The workaround is in, and the double paste problem should be fixed. I've split off bug 28401 for the redesign issue (do it the right way after beta, preferably in M15).
Status: ASSIGNED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
*** Bug 28596 has been marked as a duplicate of this bug. ***
*** Bug 28596 has been marked as a duplicate of this bug. ***
I don't have a solaris with a wheelmouse, hume can you verify this?
Whiteboard: [PDT+] testing proposed fix now → [PDT+] requesting verification from reporter
I was seeing this on linux before I checked in the workaround, and it shouldn't matter whether it's a wheel mouse or not -- a middle click event is a middle click event, at least until M15 when we make middle mouse paste pref-able.
I'm not the reporter, but I was experiencing this bug all the time until the fix was checked in. Marking VERIFIED.
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.