Closed Bug 891688 Opened 13 years ago Closed 13 years ago

Defect - Caret selections not always appearing when tapping inside text areas embedded in iframes

Categories

(Firefox for Metro Graveyard :: Input, defect, P2)

x86_64
Windows 8.1
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 25

People

(Reporter: kjozwiak, Assigned: jimm)

References

Details

(Whiteboard: [selection] feature=defect u=metro_firefox_user c=content_features p=3)

Attachments

(2 files, 3 obsolete files)

When tapping inside text area's, the caret selection monocles will not be consistent and only appear on every other tap. Steps to reproduce the issue: 1) Open Firefox Metro 2) Go to https://developer.mozilla.org/en-US/docs/HTML/HTML_Elements/textarea#HTML_Content 3) Tap on the word "something" inside the text area where the "Write something here" message appears (caret monocle should appear) 4) Tap on the word "Write" inside the text area (caret monocle will not be displayed) 5) Tap on the word "here" inside the text area (caret monocle should appear) 6) Tap on the word "something" inside the text area (caret monocle will not be displayed) Current Behavior: - caret selection monocles only appear on every other tap and are not consistent Expected Behavior: - caret selection monocle should be displayed every single time a user taps anywhere inside the text area
confirmed, I can reproduce.
Whiteboard: feature=defect u=metro_firefox_user c=content_features p=0 → feature=defect u=metro_firefox_user c=content_features p=0, [selection]
Summary: Defect - Caret selections not always appearing when tapping inside text area's → Defect - Caret selections not always appearing when tapping inside text areas embedded in iframes
Attached file simple text area —
Priority: -- → P2
This is caused by us getting sub-frame relative coords in our tap capture listener - http://mxr.mozilla.org/mozilla-central/source/browser/metro/base/content/helperui/SelectionHelperUI.js#809 which results in pointInTargetElement begin false here - http://mxr.mozilla.org/mozilla-central/source/browser/metro/base/content/helperui/SelectionHelperUI.js#820 so we shut down selection on every other tap. Tricky bug to fix, _msgTarget is the parent browser, so the translation doesn't happen. This is a pretty serious flaw when dealing with subframes, but I don't see a way to address it without breaking remote content compatibility.
What we could do here is detect that it's a subframe in SelectionHandler on set up and hand back coordinate offset info SelectionHelperUI can apply.
Attached patch wip (obsolete) — — Splinter Review
Assignee: nobody → jmathies
Attached patch wip (obsolete) — — Splinter Review
Attachment #781893 - Attachment is obsolete: true
Blocks: metrov1it12
No longer blocks: metrov1defect&change
Status: NEW → ASSIGNED
QA Contact: jbecerra
Whiteboard: feature=defect u=metro_firefox_user c=content_features p=0, [selection] → [selection] feature=defect u=metro_firefox_user c=content_features p=0
Whiteboard: [selection] feature=defect u=metro_firefox_user c=content_features p=0 → [selection] feature=defect u=metro_firefox_user c=content_features p=3
Attached patch patch (obsolete) — — Splinter Review
Attachment #781898 - Attachment is obsolete: true
Attached patch patch + tests — — Splinter Review
Pushed to try. This test also pummels our FormHelper code pretty hard, which triggers a number of js errors in that module during the run. I'll file a follow up on that.
Attachment #782520 - Attachment is obsolete: true
Blocks: 899027
Comment on attachment 782521 [details] [diff] [review] patch + tests https://tbpl.mozilla.org/?tree=Try&showall=0&rev=4edf749c980f Turned out that most of logic in the click handler could go away, the rest of the selection code has solidified up enough that it wasn't needed.
Attachment #782521 - Flags: review?(mbrubeck)
Attachment #782521 - Flags: review?(mbrubeck) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
Please land on fx-team now (see newsgroup post) - this unfortunately caused conflicts with metro landings on fx-team. Thank you :-)
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 Build ID: 20130815030203 Built from http://hg.mozilla.org/mozilla-central/rev/a8daa428ccbc WFM Tested on windows 8 using latest nightly for iteration-12. Followed steps provided in comment0 and got expected result.
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: