Closed Bug 573447 Opened 15 years ago Closed 15 years ago

FormHelper doesn't work with iframes in designmode

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Maemo
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: p.chwiej, Assigned: vingtetun)

References

Details

Attachments

(2 files, 1 obsolete file)

User-Agent: Opera/9.80 (Windows NT 5.1; U; pl) Presto/2.5.24 Version/10.53 Build Identifier: Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.3a6pre) Gecko/20100621 Namoroka/3.7a6pre Fennec/2.0a1pre Maemo5 Fennec trunk build Gecko/20100621 Reproducible: Always Steps to Reproduce: 1. Open attached TC 2. Focus first input field 3. Tap 'Next' button from formhelper Actual Results: Last input is focused, iframe in the middle is omitted Expected Results: iframe in the middle should be focused Note that such iframes are used in rich text editors, this affects usability of formhelper on gmail, mail.aol.com, mail.yahoo etc..
Attached file TC
Whiteboard: formfill
Component: Linux/Maemo → General
OS: Linux → Linux (embedded)
Hardware: Other → ARM
copied test page to http://people.mozilla.com/~nhirata/html_tp/bug573447.htm confirmed: Mozilla/5.0 (Android; Linux armv71; rv2.0b8pre) Gecko/20101116 Firefox/4.0b8pre Fennec/4.0b3pre
Status: UNCONFIRMED → NEW
Ever confirmed: true
fix is in bug 609729
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
This was not fixed by bug 609729. Form viewer does not appear for the iframe, VKB does appear.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Attached patch Patch (obsolete) — Splinter Review
The patch add code to handle "designMode" and factorize the code added in the bug for editable frame to not spread code to check those cases everywhere
Attachment #493673 - Flags: review?(mark.finkle)
Comment on attachment 493673 [details] [diff] [review] Patch >diff --git a/chrome/content/Util.js b/chrome/content/Util.js >+ /* Like dump but print the module name in red (on Linux) */ >+ log: function(aModule, aMessage) { >+ dump("\033[0;31m" + aModule + ":: " + "\033[0;37m"); >+ dump(aMessage + "\n"); I don't know that we should have this in the code. Let's not add this. >diff --git a/chrome/content/forms.js b/chrome/content/forms.js > handleEvent: function formHelperHandleEvent(aEvent) { > // If a body element is editable and the body is the child of an > // iframe we can assume this is an advanced HTML editor, so let's > // redirect the form helper selection to the iframe element >- if (focusedElement) { >+ if (focusedElement && this._isEditable(focusedElement)) { > let editableElement = this._getTopLevelEditable(focusedElement); >- if (editableElement.isContentEditable && this._isValidElement(editableElement)) { >+ if (this._isValidElement(editableElement)) { > let self = this; >+ this.focusSync = false; > let timer = new Util.Timeout(function() { > self.open(editableElement); >+ this.focusSync = true; > }); > timer.once(0); Having the | this.focusSync = false; | outside the timer function worries me. Can we move the | self.focusSync = false; | _inside_ the timer function? Also, you need to use | self.focusSync = true; | not | this.focusSync = true; | inside the timer function (notice "this" -> "self") r- for the this -> self part, but also waiting for the answer to moving the focusSync part into the timer function.
Attachment #493673 - Flags: review?(mark.finkle) → review-
In this patch: * Removal the Util.log function * Removal of the [this/self].focusSync call
Attachment #493682 - Flags: review?(mark.finkle)
Attachment #493682 - Flags: review?(mark.finkle) → review+
Whiteboard: formfill → [fennec-checkin-postb3]
Attachment #493673 - Attachment is obsolete: true
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Whiteboard: [fennec-checkin-postb3]
verified FIXED on builds: Mozilla/5.0 (Maemo; Linux armv71; rv:2.0b8pre) Gecko/20101210 Namoroka/4.0b8pre Fennec/4.0b3pre and Mozilla/5.0 (Android; Linux armv71; rv:2.0b8pre) Gecko/20101210 Namoroka/4.0b8pre Fennec/4.0b3pre
Status: RESOLVED → VERIFIED
bugspam
Assignee: nobody → 21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: