Closed Bug 110245 Opened 24 years ago Closed 24 years ago

copy/paste to another application does not work (most of the time)

Categories

(SeaMonkey :: General, defect)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 75345

People

(Reporter: 3.14, Assigned: asa)

Details

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012 This bug happens most of the time, I have no clear way of reproducing it, though. Whenever I copy something from Mozilla (e.g., the location or text from a message or text from a web page), I cannot paste it to another application like a terminal or gvim. I can *always* paste it to anywhere in Mozilla. When I right-click on a URL and copy the location, I can always paste it whereever I like. pi
I have (and have had for as long as I can remember) the same problem using Windows 2000. Note however, that choosing Copy from the Edit menu succeeds, where as Ctrl+C fails.
In my case (Linux) Copy from the Edit menu has the same effect (i.e., it does not work). In my Windows 98SE installation I never had any problem with copy/paste. That is the reason I marked this a Linux bug. Of course, there might also be a Windows 2k issue, related or unrelated to the Linux issue.
there are other copy-paste bugs.. looks like a linux context menu and w2K context menu issue.. could be partially implemented.. see bug 108339 along with others linked in there..
I am not sure, this is the same thing. But it could be related. My point here is that it works internally, but you cannot paste into another application. My understanding of the other cited bugs is that they don't work within Mozilla. pi
see also bug 93308
As for bug 93308: No problem with this for me. pi
OK. could we have some specific steps to reproduce here? 1) How do you highlight the text? 2) How do you copy the text? 3) How do you paste the text in the other applications? (the thing that does not work) 4) How do you paste the text into Mozilla (the thing that does work) 5) What does xclipboard show as you do all this (run xclipboard from a prompt and watch that window as you go through these steps).
> 1) How do you highlight the text? Usually with the mouse, but in the location field or in mail/news also with keyboard (using the shift key). > 2) How do you copy the text? Either by CTRL-C or Edit/Copy, makes no difference. > 3) How do you paste the text in the other applications? (the thing that does notwork) Using the middle mouse button. If it doesn't work I get whatever was previously available to paste in that other application. > 4) How do you paste the text into Mozilla (the thing that does work) Either by middle mouse button or CTRL-V, makes no difference. >5) What does xclipboard show as you do all this (run xclipboard from a prompt and watch that window as you go through these steps). That is getting strange. It looks like xclipboard is unrelated. It somethimes reacts to copying in Mozilla or from rxvt. I just copied in Mozilla, which showed up, but I could not paste it into rxvt or gvim. Another try and it works. Doing exactly the same works at one time and not in the other, even though, it changes the clipboard. Doing it the other way round, I copied something in rxvt (mark with mouse, right mouse button). I could paste it here in this form, even though nothing showed up in the clipboard. I am sorry this is that confusing and I cannot give exakt steps to reproduce it, it just happens. And it is annoying big time. But please note, that the problem *only* occurs with Mozilla. Copy/Paste from and to any other application works all the time. One thing which looks related it bug 103806 pi
OK. I think a quick explanation of the X clipboard model will clarify this. :) For our purposes X has two clipboards (there is a third one, but it's deprecated and Mozilla does not use it, hence it does not enter the equation here). The two clipboards are the Primary Selection (Primary) and the clipboard (Clipboard). Here is how they interact: 1) Highlighting text with the mouse should place it in Primary but not Clipboard 2) Highlighting text with the keyboard (shift-arrow) should technically not place it into either Primary or Clipboard. This is Mozilla's behavior. Other applications _do_ place text selected via keyboard in Primary (the examples I've tried are Netscape 4.x and Gnumeric). StarOffice does what Mozilla does. I should note that highlighting text with keyboard for purposes of deleting it should _not_ place it in Primary, so NS4 and Gnumeric are buggy in this regard. 3) Once text is highlighted (by whatever method) selecting "Copy" from a menu should place it in Clipboard. This is the case uniformly in Mozilla, NS4, Gnumeric, StarOffice. emacs places the text in its own internal kill buffer, gvim places it in Primary (bug in gvim). 4) Clicking the middle mouse button should paste the contents of Primary 5) Selecting "Paste" from a menu (or Ctrl-v) should paste the contents of Clipboard (some terminals get this wrong, since a terminal usually just interacts with Primary). gvim also gets this wrong -- it pastes Primary (which is pointless, since you can paste Primary with a middle click). emacs/xemacs/Mozilla/NS4/Gnumeric/StarOffice all get it right. xclipboard fits into all this by showing the text in Clipboard and allowing you to select it with the mouse (thus placing it in Primary) So. Steps that I bet reliably reproduce this problem: A) Highlight text in URL bar with _keyboard_. Does not place text in Primary or Clipboard. B) Use "Copy" or "Ctrl-c" (places text in Clipboard) C) Paste to another application using the middle mouse button (pastes the contents of Primary, hence the "If it doesn't work I get whatever was previously available" symptom. If these steps reproduce the problem for you reliably, then the only solution we could come up with (short of fixing gvim's bugs) would be to break our behavior in point (2) above (I already mentioned one reason this is not such a great idea). The other option, of course, is to get used to thinking of highlight/middle-mouse and ctrl-c/ctrl-v as two unrelated sets of operations... If these steps do _not_ reproduce the problem, we should do some more digging. :) Please try them and comment in this bug.
> A) Highlight text in URL bar with _keyboard_. Does not place text in > Primary or Clipboard. > B) Use "Copy" or "Ctrl-c" (places text in Clipboard) > C) Paste to another application using the middle mouse button (pastes the > contents of Primary, hence the "If it doesn't work I get whatever was > previously available" symptom. > > If these steps reproduce the problem for you reliably, That is the problem. Most of the time, I cannot paste the URL in this case into rxvt (same for gvim). Sometimes it works, though. I have absolutely no idea what makes the difference. > The other option, of course, is to get used to thinking of > highlight/middle-mouse and ctrl-c/ctrl-v as two unrelated sets of > operations... Either way I don't get the url into the terminal. > If these steps do _not_ reproduce the problem, we should do some more > digging. Maybe now I am totally confused. For sure I don't have a reproducible way to copy things from Mozilla to the terminal (rxvt). pi
OK. Try the following: 1) highlight text in mozilla with mouse 2) middle click into rxvt Does that always work?
Oh my god, how embarrasing#-) I never thought about that simple possibility. Yes, that does it. Thank you so much. I guess, this makes this bug report invalid. pi
actually, it seems we already have a bug to change our behavior as regards point (2). After that mouse and keyboard selection in mozilla will act the same (in both cases you will be able to paste into rxvt with middle mouse). Marking this duplicate of "Non-mouse selection of text doesn't copy to clipboard" *** This bug has been marked as a duplicate of 75345 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Someone should just bring this bug to an end. Yes, this is a dupe. pi
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.