No Copy/paste of content in certain input field types in prefs

VERIFIED FIXED in Firefox 4.0

Status

Firefox for Android Graveyard
General
P2
normal
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: tchung, Assigned: vingtetun)

Tracking

Trunk
Firefox 4.0
ARM
Android
Dependency tree / graph

Details

(Whiteboard: [has patch][has review][needs approval])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

7 years ago
+++ This bug was initially created as a clone of Bug #636666 +++

It would be great to allow copy/paste support for that have input boxes (eg. Test Harness 1.0, Sync name field)   It seems to work for the search an Addon box, but no where else.

Repro:
1) install fennec android nightly: Mozilla/5.0 (Android; Linux armv71; rv:2.0b13pre) Gecko/20110303 Firefox/4.0b13pre Fennec/4.0b6pre	
2) copy a url from a some content page
3) open prefs, visit Sync textboxes (or install Addon with a input box--Eg. test Harness 1.0)
4) content click the text box, and verify there's no copy/paste support in these input boxes

Expected:
- support copy/paste content in the pref input boxes (does work for search an addon though)

Actual:
- none
There is 2 differents bug here:
 * The TapLong event is not fired on the originalTarget which means that if the textbox is nested into some xbl bindings it won't be the target anymore

 * Opening the context menu over the bookmark editor dialog close it!
Assignee: nobody → 21
Created attachment 517386 [details] [diff] [review]
Patch

The patch fixes both bugs mentionned earlier and rename a parameter since to MouseEvent from MouseUpEvent since the event sometimes come from MouseDown like the TapLong case.
Attachment #517386 - Flags: review?(mbrubeck)
Comment on attachment 517386 [details] [diff] [review]
Patch

>diff --git a/chrome/content/BookmarkHelper.js b/chrome/content/BookmarkHelper.js
>--- a/chrome/content/BookmarkHelper.js
>+++ b/chrome/content/BookmarkHelper.js

>     this.box.hidden = false;
>-    BrowserUI.pushPopup(this, this.box);

> 
>     this.box.hidden = true;
>-    BrowserUI.popPopup(this);

What's the reason for these changes?  Among other things, this makes the escape/back button work wrong the bookmark dialog is visible.  (Pressing escape/back makes the web page navigate backwards, instead of hiding the dialog.)

>+++ b/chrome/content/input.js

>+  _dispatchTap: function _dispatchTap(aType, aMouseEvent) {
>     // borrowed from nsIDOMNSEvent.idl
>     let modifiers =
>+      (aMouseEvent.altKey   ? Ci.nsIDOMNSEvent.ALT_MASK     : 0) |
>+      (aMouseEvent.ctrlKey  ? Ci.nsIDOMNSEvent.CONTROL_MASK : 0) |
>+      (aMouseEvent.shiftKey ? Ci.nsIDOMNSEvent.SHIFT_MASK   : 0) |
>+      (aMouseEvent.metaKey  ? Ci.nsIDOMNSEvent.META_MASK    : 0);
> 
>     let event = document.createEvent("Events");
>     event.initEvent(aType, true, false);
>+    event.clientX = aMouseEvent.clientX;
>+    event.clientY = aMouseEvent.clientY;
>     event.modifiers = modifiers;
>+    aMouseEvent.originalTarget.dispatchEvent(event);
>   },

This part looks fine.
Attachment #517386 - Flags: review?(mbrubeck) → review-
(In reply to comment #3)
> Comment on attachment 517386 [details] [diff] [review]
> Patch
> 
> >diff --git a/chrome/content/BookmarkHelper.js b/chrome/content/BookmarkHelper.js
> >--- a/chrome/content/BookmarkHelper.js
> >+++ b/chrome/content/BookmarkHelper.js
> 
> >     this.box.hidden = false;
> >-    BrowserUI.pushPopup(this, this.box);
> 
> > 
> >     this.box.hidden = true;
> >-    BrowserUI.popPopup(this);
> 
> What's the reason for these changes?  Among other things, this makes the
> escape/back button work wrong the bookmark dialog is visible.  (Pressing
> escape/back makes the web page navigate backwards, instead of hiding the
> dialog.)

Because we can have only one popup at a time and since the contextual menu is a popup, this bookmark dialog and it won't fit together.
Because of that I think we should reconsider this panel not as a popup but as a dialog (and to correct the backspace/escape behavior there is the pushDialog API)

Does it make sense to you?
Created attachment 517443 [details] [diff] [review]
Patch v0.2

Use pushDialog/popDialog
Attachment #517386 - Attachment is obsolete: true
Attachment #517443 - Flags: review?(mbrubeck)
Priority: -- → P2
Attachment #517443 - Flags: review?(mbrubeck) → review+
tracking-fennec: --- → ?
Whiteboard: [has patch][has review][needs approval]
http://hg.mozilla.org/mobile-browser/rev/052bbbee439b
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED

Comment 7

7 years ago
VERIFIED FIXED on:

Build Id: Mozilla /5.0 (Android;Linux armv7l;rv:2.0b13pre) Gecko/20110316 Firefox/4.0b13pre Fennec /4.0b6pre 

Device: Motorola Droid 2 (Android 2.2)
Status: RESOLVED → VERIFIED
Target Milestone: --- → Firefox 4.0
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.