Closed
Bug 289757
Opened 20 years ago
Closed 17 years ago
paste on middle click does not take into account existing selection
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
RESOLVED
INVALID
People
(Reporter: ispiked, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2 When you try to paste something into a form with already highlighted text with the middle mouse button it does not delete the previous string of text and insert the text from the clipboard. It instead inserts the string from the clipboard into the highlighted string. Reproducible: Always Steps to Reproduce: 1. Make sure you have a string of text on the clipboard. 2. Type something into a form field. 3. Highlight it (either with triple click or by dragging the mouse over it). 4. Middle click on the highlighted text. Actual Results: The text from the clipboard is inserted into the highlighted text. Expected Results: Removed the highlighted text and inserted the new text.
Comment 1•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050409 Firefox/1.0+ Middleclick does nothing for me. Only rightclick does (contextmenu) May this be extensionrelated ?
| Reporter | ||
Comment 2•20 years ago
|
||
(In reply to comment #1) > Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050409 > Firefox/1.0+ > > > Middleclick does nothing for me. > Only rightclick does (contextmenu) > > May this be extensionrelated ? I forgot to mention that you must have middlemouse.paste set to true in about:config. This could be related to an extention (mouse gestures?) but I had a friend test it and he got the same result without any special extentions installed.
Comment 3•20 years ago
|
||
Also happens with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050404 Firefox/1.0+ I didn't even know you can paste like this...
Comment 5•20 years ago
|
||
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050401 Firefox/1.0.2 (Debian package 1.0.2-2) I can confirm this bug for Linux (Debian) as well. I guess it's platform independent.
Comment 6•20 years ago
|
||
The middle click paste code isn't aware of existing selections. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/editor/libeditor/text/nsEditorEventListeners.cpp&rev=1.233#303
Assignee: firefox → mozeditor
Component: General → Editor
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → bugzilla
Hardware: PC → All
Summary: paste on middle click does not work as expected → paste on middle click does not take into account existing selection
Version: unspecified → Trunk
Comment 7•20 years ago
|
||
Middle-click should simply paste at the mouse cursor location. _Maybe_ if that's inside the existing selection the selection should be replaced. But in general, this should NOT replace the existing selection.
Comment 8•20 years ago
|
||
(In reply to comment #7) > Middle-click should simply paste at the mouse cursor location. _Maybe_ if > that's inside the existing selection the selection should be replaced. But in > general, this should NOT replace the existing selection. Right, I would only expect the selection to be replaced if that's where you're pasting. Is that not the standard behavior for middle click paste in other apps?
Comment 9•20 years ago
|
||
There is no standard behavior. OpenOffice never replaces; if you paste on top of the selected stuff it ignores your paste attempt; if you pasted outside it, it inserts at mouse pointer. Gnumeric (and possibly other GNOME apps?) replaces the selected text no matter where the mouse pointer is (which makes very little sense, imo). Opera does what Mozilla does right now. Konqueror (and other KDE apps?) simply forgets its selection completely if I select something in a different window, so the situation cannot possibly arise.
| Reporter | ||
Comment 10•20 years ago
|
||
(In reply to comment #7) > Middle-click should simply paste at the mouse cursor location. _Maybe_ if > that's inside the existing selection the selection should be replaced. But in > general, this should NOT replace the existing selection. I see where you're coming from, but considering that when you paste text into other text when it's NOT highlighted it already does this, wouldn't it make sense to have it replace the text when the selection IS highlighted? It seems stupid to have it do the same thing both when it's selected AND when it's not.
Comment 11•20 years ago
|
||
Generally, doing the same thing for the same user action is considered a good thing in UI design from what I understand... principle of least surprise and all. In other words, why are you assuming the user purposefully highlighted some text, then copied text in another app and then pasted (as opposed to just accidentally highlighting text at some point, as a lot of people just sort of do with mice, and then at a later point pasting something into that window)?
| Reporter | ||
Comment 12•19 years ago
|
||
*** Bug 320754 has been marked as a duplicate of this bug. ***
Comment 13•19 years ago
|
||
"doing the same thing for the same user action is considered a good thing in UI design from what I understand... principle of least surprise and all" Yes; when I select text and hit paste, I expect the text to be replaced, such as with Ctrl-V or edit->paste. When commanding a paste through a middle-click, I expect the same behavior. Why should middle click paste behave differently than edit->paste or ctrl-V?
Comment 14•19 years ago
|
||
> Why should middle click paste behave differently than edit->paste or ctrl-V?
Because they're completely different operations -- they have different behavior in terms of what text they paste and when the "selection" is cleared. Middle click is just like the drop part of a drag-and-drop operation (with the "select" step being the "drag start"), not at all like a clipboard paste operation.
The very fact that middle click does anything but paste in the currently-selected text when some text is selected is a bug.
Comment 15•18 years ago
|
||
bz in comment #14: > > Why should middle click paste behave differently than edit->paste or ctrl-V? > > Because they're completely different operations -- they have different behavior > in terms of what text they paste and when the "selection" is cleared. Middle > click is just like the drop part of a drag-and-drop operation (with the > "select" step being the "drag start"), not at all like a clipboard paste > operation. so, this is WONTFIX?
Assignee: mozeditor → nobody
QA Contact: bugzilla
Updated•18 years ago
|
QA Contact: editor
Comment 16•17 years ago
|
||
Happens very often, that I try to middle mouse paste an URL in the selected location bar. I can't get used to the fact that this doesn't remove the selection although it has never worked.
| Reporter | ||
Comment 17•17 years ago
|
||
Boris hit the nail on the head in comment 14, and although it pains me, I'm going to resolve the first bug I filed as INVALID. ->INVALID
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Comment 19•17 years ago
|
||
Is there a way to create this kind of functionality? Either in terms of editing a file, creating a script, or making an extension? I've been looking for some way to do this and I think several people might like this functionality. Any starting points?
Comment 20•16 years ago
|
||
i do not agree with boris in comment 14. however if you do accept his view, when dragging and dropping text to the url or search bar, the previous contents of the bar is replaced. boris claims that middle click emulates the drop. however whether the previous text is selected or not, the new text is inserted not replaced. therefor the functionality would replace a selected text in the bar either way (if you assume middle click equals paste or if you assume middle click equals drop). the question would than remain whether to do a replace or insert in the case that the text is NOT selected (i would prefer the latter in this case) please UNRESOLVE
Comment 21•16 years ago
|
||
> when dragging and dropping text to the url or search bar, the previous
> contents of the bar is replaced.
Only in Firefox (for example not in Seamonkey), and only for those textfields. If you try dragging into another textfield, you will see that insertion happens, as expected.
I personally thing the URL bar behavior is whack, but that's a Firefox UI decision. If they want, they can also make that happen for middle-click. But editor by default should NOT be doing that. And this bug is about what editor should do by default. Note the product and component.
You need to log in
before you can comment on or make changes to this bug.
Description
•