Closed Bug 1122805 Opened 9 years ago Closed 9 years ago

[Marketplace][Text Selection] User is able to select text from the listing of apps causing marketplace to become unresponsive and eventually crash.

Categories

(Core :: DOM: Selection, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

()

VERIFIED FIXED
mozilla38
blocking-b2g 2.2+
Tracking Status
firefox36 --- wontfix
firefox37 --- wontfix
firefox38 --- fixed
b2g-v2.2 --- verified
b2g-master --- verified

People

(Reporter: jmitchell, Assigned: chenpighead)

References

()

Details

(Whiteboard: [3.0-Daily-Testing])

Attachments

(2 files, 2 obsolete files)

Description:
Using the new text selection features the user is able to select text from the Category Header (example: Fresh and New Apps or Popular All Time), listing of apps (App name, App Creator, Rating). Text can be highlighted blue. After a few seconds the app will not accept any user input except for scrolling the page. Clicking any icons, or menu words have no effect. After a few more seconds th app will crash.

Repro Steps:
1) Update a Flame to 20150116002502
2) Open Marketplace App
3) Select the 'New' tab
4) Long press on 'Fresh and New Apps'


Actual:
Text becomes selected with "select all and copy options". If the user further interacts with these options (such as selecting all - the app can become unresponsive except for scrolling and will eventually (after 30-50 seconds) crash back to the homescreen.

Expected:
With the exception of the search bar, text will not be selectable.

Environmental Variables:
Device: Flame Master
Build ID: 20150116002502
Gaia: 2f916cdba7305b51a72482b6bfe860c5b8924f9c
Gecko: b4c7c83a44a5
Gonk: a814b2e2dfdda7140cb3a357617dc4fbb1435e76
Version: 37.0a2 (Master)
Firmware Version: V18d
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0

Repro frequency: 8/9 
See attached: logcat, video: http://youtu.be/U-8VmKEL7lg

-----------------------------------------------------------------------------------------------
This issue repros' on 2.2 (v18d-1) and 2.2 (v18d) 
Prior to 2.2 text selection was not implemented. 

Device: Flame 2.2 (KK - Nightly - Full-Flashed)
Build ID: 20150116002502
Gaia: 2f916cdba7305b51a72482b6bfe860c5b8924f9c
Gecko: b4c7c83a44a5
Gonk: a814b2e2dfdda7140cb3a357617dc4fbb1435e76
Version: 37.0a2 (Master)
Firmware Version: V18d-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0

Device: Flame 2.2 (KK - Nightly - Full-Flashed)
Build ID: 20150116002502
Gaia: 2f916cdba7305b51a72482b6bfe860c5b8924f9c
Gecko: b4c7c83a44a5
Gonk: a814b2e2dfdda7140cb3a357617dc4fbb1435e76
Version: 37.0a2 (Master)
Firmware Version: V18d
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Component: Consumer Pages → General
Product: Marketplace → Firefox OS
Version: Avenir → unspecified
Nominating this 2.2? since the user loses functionality and the marketplace will close out.
blocking-b2g: --- → 2.2?
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Triage: blocker. We'll take a look from Gecko first.
Assignee: nobody → jeremychen
blocking-b2g: 2.2? → 2.2+
Priority: -- → P1
I found that the crash is caused by infinite triggering reflows. 

It is known that selection carets' positions are set to the start/end positions in canvas while selecting all. During the setting process, the style of canvas (style.width in this case) is changed repeatedly. So, I changed carets' style.position from "absolute" to "fixed" to avoid modifying canvas's style, which also avoid unnecessary reflows.

To maintain the correct positions of carets, selection/touch carets' update position function should be patched as well.
Attachment #8557725 - Flags: review?(roc)
Component: General → Selection
Product: Firefox OS → Core
Version: unspecified → Trunk
CSS rules in ua.css are updated.

Touch/selection carets are created in 2-level divs. Since we update carets' positions by setting the positions of outer divs, we need to make sure the inner divs, which contain the actual caret images, will always stick with the outer divs.
Attachment #8557725 - Attachment is obsolete: true
Comment on attachment 8559672 [details] [diff] [review]
Update carets' positions based on coordinates of the root frame. r=roc (v2, carry r+)

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: apps (marketplace, browser,etc.) may be crashed when selecting all under some circumstances
Testing completed: Try is positive on master try
Risk to taking this patch (and alternatives if risky): low risk
String or UUID changes made by this patch: not available
Attachment #8559672 - Flags: approval-mozilla-b2g37?
Remove codes for printing debug logs.
Attachment #8559672 - Attachment is obsolete: true
Attachment #8559672 - Flags: approval-mozilla-b2g37?
Comment on attachment 8559685 [details] [diff] [review]
Update carets' positions based on coordinates of the root frame. r=roc (v3, carry r+)

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: apps (marketplace, browser,etc.) may be crashed when selecting all under some circumstances
Testing completed: Try is positive on master try
Risk to taking this patch (and alternatives if risky): low risk
String or UUID changes made by this patch: not available
Attachment #8559685 - Flags: approval-mozilla-b2g37?
https://hg.mozilla.org/mozilla-central/rev/3516564ed401
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Attachment #8559685 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
This issue is verified fixed on the latest Nightly Flame 3.0 and 2.2 builds.

Actual Results: Selecting text and performing copy/paste actions does not adversly affect the marketplace app.

Environmental Variables:
Device: Flame 3.0
BuildID: 20150302010223
Gaia: f34ce82a840ad3c0aed3bfff18517b3f6a0eb37f
Gecko: eea6188b9b05
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 39.0a1 (3.0) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:39.0) Gecko/39.0 Firefox/39.0

Environmental Variables:
Device: Flame 2.2
BuildID: 20150302002504
Gaia: 77609916ca5ab721150fab2b7bc5c37f43ee3a5a
Gecko: 27ab8aa34201
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 37.0 (2.2) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: