Closed Bug 392159 Opened 18 years ago Closed 14 years ago

Middle-click paste doesn't work under Mac OS X when middlemouse.paste is true

Categories

(Core :: DOM: Editor, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: vincent-moz, Assigned: masayuki)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 Build Identifier: As documented in http://kb.mozillazine.org/Middlemouse.paste, I've set middlemouse.paste to true to be able to paste with the middle button, but this has no effect. Reproducible: Always Steps to Reproduce: 1. Set middlemouse.paste to true. 2. Copy something to the clipboard. 3. Middle-click over an editable text field. Actual Results: Nothing happens. Expected Results: The contents of the clipboard should be pasted, like under Linux.
This is a problem with both Firefox 2.0.0.6 and yesterday's Minefield nightly, and so (presumably) with both Cocoa widgets and Mac widgets.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: jag → nobody
ludo, can you reproduce?
MacOS X doesn't have a clipboard for primary selection. http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSPasteboard_Class/Reference/Reference.html So, we should use global clipboard for the middle paste. # And we should get rid of #ifdef from the nsEditorEventHandler.cpp.
Status: NEW → ASSIGNED
Component: XUL → Editor
QA Contact: xptoolkit.widgets → editor
Hardware: PowerPC → All
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → masayuki
Attachment #570206 - Flags: review?(ehsan)
Comment on attachment 570206 [details] [diff] [review] Patch Review of attachment 570206 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the nits below. ::: editor/libeditor/base/nsEditorEventListener.cpp @@ +59,5 @@ > > // Drag & Drop, Clipboard > #include "nsIServiceManager.h" > #include "nsIClipboard.h" > +#include "nsWidgetsCID.h" This can be removed (see below). @@ +75,5 @@ > #include "nsIBidiKeyboard.h" > > using namespace mozilla; > > +static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID); This can be removed (see below). @@ +572,5 @@ > mailEditor = do_QueryObject(mEditor); > > + PRInt32 clipboard = nsIClipboard::kGlobalClipboard; > + nsCOMPtr<nsIClipboard> clipboardService = > + do_GetService(kCClipboardCID, &rv); Please use do_GetService("@mozilla.org/widget/clipboard;1", &rv).
Attached patch PatchSplinter Review
Attachment #570206 - Attachment is obsolete: true
Attachment #577120 - Flags: review?(ehsan)
Attachment #570206 - Flags: review?(ehsan)
Comment on attachment 577120 [details] [diff] [review] Patch Looks great, thanks!
Attachment #577120 - Flags: review?(ehsan) → review+
Flags: in-testsuite+
Whiteboard: [inbound]
Target Milestone: --- → mozilla11
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: