Closed
Bug 1098161
Opened 10 years ago
Closed 10 years ago
[Text Selection]Trigger text dialog by long press when input filed is empty
Categories
(Core :: DOM: Selection, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: pchang, Assigned: pchang)
References
Details
Attachments
(1 file, 5 obsolete files)
|
4.17 KB,
patch
|
pchang
:
review+
|
Details | Diff | Splinter Review |
This bug is the follow up bug from bug 1059165 comment 35.
https://bugzilla.mozilla.org/show_bug.cgi?id=1059165#c35
| Assignee | ||
Updated•10 years ago
|
Blocks: CopyPasteLegacy
| Assignee | ||
Comment 1•10 years ago
|
||
Omega, do we need to show the touch caret for this case?
Flags: needinfo?(ofeng)
Comment 2•10 years ago
|
||
Basically I accept either showing the touch caret or not, but personally prefer showing the caret. In other cases, when the utility bubble shows, the touch carets are always visible. So, it's better to keep some consistency here.
Flags: needinfo?(ofeng)
| Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Omega Feng [:Omega] [:馮於懋] (please ni?) from comment #2)
> Basically I accept either showing the touch caret or not, but personally
> prefer showing the caret. In other cases, when the utility bubble shows, the
> touch carets are always visible. So, it's better to keep some consistency
> here.
Thanks, I also prefer to show touch caret during this use case. I will check the technical part based on our above discussion.
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → pchang
Priority: -- → P2
Comment 5•10 years ago
|
||
Hi Peter, I saw some weird result while long press on empty contentEditable element in message app:
- Long press on message app recipient field
- Long press on message app subject field
In this 2 cases the caret will be in wrong position, will you also solve in this bug?
| Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Steve Chung [:steveck] from comment #5)
> Hi Peter, I saw some weird result while long press on empty contentEditable
> element in message app:
> - Long press on message app recipient field
> - Long press on message app subject field
>
> In this 2 cases the caret will be in wrong position, will you also solve in
> this bug?
Yes, I will fix them too.
| Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8533575 -
Flags: review?(roc)
| Assignee | ||
Updated•10 years ago
|
Attachment #8533575 -
Flags: review?(roc)
| Assignee | ||
Comment 8•10 years ago
|
||
Cancel the review because I would like to check with UX about the visibility of touch caret for long tap and short cut mode for empty content.
| Assignee | ||
Comment 9•10 years ago
|
||
Omega, this bug is trying to implement the following UX spec[1] for long tap use case.
Based on UX spec, we would display touch caret and text dialog(utility bubble) when long press on empty content.
But it only shows text dialog for empty content area when there is something copied within 15 seconds(short-cut mode). Is it possible to display text dialog for empty content field no matter long press or short cut?
[1]https://bug921965.bugzilla.mozilla.org/attachment.cgi?id=8521959#9
Flags: needinfo?(ofeng)
Comment 10•10 years ago
|
||
OK, let's show only text dialog(utility bubble) for both long press and short press (paste shortcut) on an empty input.
Flags: needinfo?(ofeng)
| Assignee | ||
Comment 11•10 years ago
|
||
Based on comment 10 to re-write the patch.
But I found a problem after non-editable is enabled.
The 'to' field of message app was not content editable, need to provide solution for non-editable content.
| Assignee | ||
Comment 12•10 years ago
|
||
For email app, the 'to', 'cc' and 'bcc' are unselectable area. But the subject is content-editable field.
| Assignee | ||
Comment 13•10 years ago
|
||
Update patch to support non-editable content with empty text
Attachment #8533575 -
Attachment is obsolete: true
Attachment #8537663 -
Flags: review?(roc)
| Assignee | ||
Comment 14•10 years ago
|
||
Update to select the right non-editable componment.
Attachment #8537663 -
Attachment is obsolete: true
Attachment #8537663 -
Flags: review?(roc)
Attachment #8537675 -
Flags: review?(roc)
Comment on attachment 8537675 [details] [diff] [review]
v3 Display text dialog when long press on the content with empty text
Review of attachment 8537675 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/base/SelectionCarets.cpp
@@ +613,5 @@
> + // Long tap event on this non-editable content with empty text, no action
> + // for selectioncarets but need to dispatch the touchcarettap event
> + // to support the short cut mode
> + DispatchCustomEvent(NS_LITERAL_STRING("touchcarettap"));
> + return NS_OK;
We should only have one copy of this code block. Move selectedContent out and put this code block after "if (editingHost)".
Attachment #8537675 -
Flags: review?(roc) → review+
| Assignee | ||
Comment 16•10 years ago
|
||
Attachment #8537675 -
Attachment is obsolete: true
Attachment #8539013 -
Flags: review+
Updated•10 years ago
|
QA Whiteboard: [textselection]
| Assignee | ||
Comment 17•10 years ago
|
||
Try server result is positive.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2fb9ce30f125
Keywords: checkin-needed
Comment 18•10 years ago
|
||
Keywords: checkin-needed
Comment 19•10 years ago
|
||
sorry had to back this out for test failures like https://treeherder.mozilla.org/logviewer.html#?job_id=4862960&repo=mozilla-inbound
| Assignee | ||
Comment 20•10 years ago
|
||
The attachment 8539013 [details] [diff] [review] is also trying to change the flow for content non-editable and therefore, it causes the marionette failed. With the bug 1110917, it starts to check the content is focusable or non-focusable and we should check the content is empty when this content is focusable.
| Assignee | ||
Comment 21•10 years ago
|
||
(In reply to peter chang[:pchang][:peter] from comment #20)
> The attachment 8539013 [details] [diff] [review] is also trying to change
> the flow for content non-editable and therefore, it causes the marionette
> failed. With the bug 1110917, it starts to check the content is focusable or
> non-focusable and we should check the content is empty when this content is
> focusable.
After applying bug 1110917, all marionette test for selectioncarets pass but only the testing items about input element are failed. Looks like it has problem to detect the text length for input element.
| Assignee | ||
Comment 22•10 years ago
|
||
Rebased with bug 110917 and passed local marionette testing.
Wait for try result.
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=3f0a44ece2e7
Attachment #8539013 -
Attachment is obsolete: true
Attachment #8544379 -
Flags: review+
| Assignee | ||
Comment 23•10 years ago
|
||
Testing result is positive. Wait for bug 1110917 to be landed.
| Assignee | ||
Comment 24•10 years ago
|
||
Just found this bug doesn't have to depend on bug 1110917. Re-modify the patch and also passed my local marionette testing.
Attachment #8544379 -
Attachment is obsolete: true
Attachment #8544945 -
Flags: review+
| Assignee | ||
Comment 25•10 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e7e2a5ea5a29
The v6 patch passed the testing.
Keywords: checkin-needed
Comment 26•10 years ago
|
||
Keywords: checkin-needed
Comment 27•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Updated•10 years ago
|
QA Whiteboard: [textselection] → [COM=Text Selection]
You need to log in
before you can comment on or make changes to this bug.
Description
•