Closed Bug 1092964 Opened 5 years ago Closed 5 years ago

Cost Control app to follow text selection pattern

Categories

(Firefox OS Graveyard :: Gaia::Cost Control, defect)

x86
macOS
defect
Not set

Tracking

(feature-b2g:2.2+, tracking-b2g:backlog)

RESOLVED FIXED
2.2 S3 (9jan)
feature-b2g 2.2+
tracking-b2g backlog

People

(Reporter: hochang, Assigned: salva)

References

Details

(Whiteboard: [NaBfT])

Attachments

(2 files)

* Input fields (input areas, input dialogs and search fields) are the only Building Blocks with selectable text. 

* HTML elements like buttons or links, or events like ontouchstart or onclick, should trigger the action when tapped rather than triggering text selection.
The Gecko work is close to completion, the remaining part is to fix test case failures then pref it on in m-c bug 1092888. After the bug landed, text selection and cut/copy/paste can be triggered in apps on both editable and non-editable elements.

Gaia per app work in v2.2 is to follow UX guideline and leverage CSS -moz-user-select https://developer.mozilla.org/en-US/docs/Web/CSS/user-select to make certain elements non-selectable.

Before Gecko is pref on in m-c, Gaia can manually switch it on by the following two pref to test in advance:
pref("selectioncaret.enabled", on);
pref("selectioncaret.noneditable", on);
I'm not sure that any part of the Cost Control components need to have text selection.  I can't see any use cases for it.

Omega/Harley, what do you think?

If there is nothing to do, let's close this bug.
Flags: needinfo?(ofeng)
Flags: needinfo?(hhsu)
I've scanned Juwei's spec and found nothing special needs text selection expect text inputs. However I don't think we should close this bug now, as I know devs still have some works to do to follow the guidelines.
Flags: needinfo?(ofeng)
Agree with Omega on comment 3. We should still keep this bug open until we are sure that everything is working properly for text selection in Cost Control.
Flags: needinfo?(hhsu)
Whiteboard: [NaBfT]
This is a 2.2 feature.
feature-b2g: 2.2? → 2.2+
QA Whiteboard: [2.2-feature-qa+]
QA Contact: jlorenzo
[Tracking Requested - why for this release]:
feature-b2g: 2.2+ → ---
tracking-b2g: --- → ?
QA Whiteboard: [2.2-feature-qa+]
(In reply to jshen from comment #6)
> [Tracking Requested - why for this release]:
Hi Jacob,
Just saw you removed the feature-b2g:2.2. 
I know we won't do smart data in 2.2 but I think copy-n-paste is still needed. 
Or, there's no effort at all for this bug?
feature-b2g: --- → 2.2?
Flags: needinfo?(jshen)
There should be few effort on this. The text selection is now enabled by default (if you long press on a word, cut/copy/paste bubble and selection caret shows), so CSS -moz-user-select:none need to be added to elements that are non-selectable.

Feel free to refer to other app's patch, e.g. bug 1092430 , thanks.
feature-b2g: 2.2? → 2.2+
Juwei, please comment.  It's both Peter's and Francisco's finding that nothing in the cost control app should be selectable.  Thanks.
Flags: needinfo?(jhuang)
Hi all,
Checked with Harly & Omega, all the text in cost control app is non-selectable.
Flags: needinfo?(jhuang)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Status: RESOLVED → REOPENED
Flags: needinfo?(jshen)
Resolution: WONTFIX → ---
Hi Salva,
Do you know who can take this bug?
Branch date is jan12 (though we'll accept uplift), so I would like to make sure there's someone taking care of it shortly.
Flags: needinfo?(salva)
Salva, in this case cost control app doesn't have any text to be selected, as per the guidelines we got.

So basically we are talking about disabling the selection for the whole app,

-moz-user-select: none

should be enough (perhaps not xD), applied to the html tag.
Assignee: nobody → salva
Flags: needinfo?(salva)
Comment on attachment 8538439 [details] [review]
[PullReq] lodr:bug-1092964-disable-selection to mozilla-b2g:master

Adding some -moz-user-select: none to make all the text (but text inputs) in Cost Control application non selectable. It was not as easy as Francisco said due to the absolutely positioned elements.
Attachment #8538439 - Flags: review?(marina.rodriguez.iglesias)
;) but easy enough

Thanks Salva!
Comment on attachment 8538439 [details] [review]
[PullReq] lodr:bug-1092964-disable-selection to mozilla-b2g:master

LGTM, Thanks Salva r+
Attachment #8538439 - Flags: review?(marina.rodriguez.iglesias) → review+
Target Milestone: --- → 2.2 S3 (9jan)
Hi Salva, can you help to land this? Thanks!
Flags: needinfo?(salva)
Rebased and waiting for treeherder.
Flags: needinfo?(salva)
master: fa5d6a134d76c401902a1549b06877d8e420643e
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.