[Messages][Drafts] Wrong Cursor position in the message compose of a Draft

VERIFIED FIXED

Status

defect
VERIFIED FIXED
5 years ago
4 years ago

People

(Reporter: oteo, Assigned: lana.scravaglieri, Mentored)

Tracking

unspecified
x86
macOS
Dependency tree / graph

Firefox Tracking Flags

(tracking-b2g:backlog, b2g-v2.1 verified)

Details

(Whiteboard: [lang=js])

Attachments

(2 attachments)

Reporter

Description

5 years ago
Wrong Cursor position in the message compose of a Draft

**PATH**
1. open message composer
2. select new message
3. type something in the message field (and also the ‘to field’ if you wish)
4. select the back button
5. select ‘save as draft’
6. Open the thread with the saved draft

**EXPECTED**
The cursor should be at the end of the message compose to continue writing the message

**ACTUAL**
The cursor is at the beginning of the message compose

Build info:

unagi-ICS.
user
master.
B-39.
Gecko-12dd20e.
Gaia-6bb1b52
blocking-b2g: --- → 1.4?
Reporter

Updated

5 years ago
Summary: [messages] Wrong Cursor position in the message compose of a Draft → [messages][Drafts] Wrong Cursor position in the message compose of a Draft
Summary: [messages][Drafts] Wrong Cursor position in the message compose of a Draft → [Messages][Drafts] Wrong Cursor position in the message compose of a Draft
Assignee: nobody → waldron.rick
Triage: feature not fully implemented, not a blocker but a nice to have so leaving the reviewer the decision on landing on master (maintaining v1.5? flag for now). Thanks!
blocking-b2g: 1.4? → 1.5?
I think this would be a good bug to mentor. Julien or Rick, anyone would like to mentor this one?
Whiteboard: [mentor=:julienw][lang=javascript]
Whiteboard: [mentor=:julienw][lang=javascript] → [mentor=:julienw][lang=js]
Hi Julien
I would like to give this a shot.Please assign this to me
Thanks
Assignee: waldron.rick → rishav006
Hi Omega, do you think we should also reset the cursor not only for draft, but also for forwarding which composer already apeend some items while entering the compose page?
Flags: needinfo?(ofeng)
to backlog
blocking-b2g: 1.5? → backlog
IMO, when entering a draft, it shouldn't focus on any input field and open keyboard. Just let users do it by themselves.
So, the issue in this bug is fixed, and users can decide to input recipient or message text or just read the existing thread.
Flags: needinfo?(ofeng)
Reporter

Comment 7

5 years ago
(In reply to Omega Feng [:Omega] from comment #6)
> IMO, when entering a draft, it shouldn't focus on any input field and open
> keyboard. Just let users do it by themselves.
> So, the issue in this bug is fixed, and users can decide to input recipient
> or message text or just read the existing thread.

When I enter in a draft is normally to finish a message that I didn't have time to finish so, for me, placing the cursor at the end of the message is really helpful, anyway you the expert and I can be wrong ;)

Checking right now master, when you enter in the draft the focus is in in the "to" input and the keyboard is shown so the bug is not fixed yet according to your proposal, is it correct?
Flags: needinfo?(ofeng)
(In reply to Maria Angeles Oteo (:oteo) from comment #7)
> When I enter in a draft is normally to finish a message that I didn't have
> time to finish so, for me, placing the cursor at the end of the message is
> really helpful, anyway you the expert and I can be wrong ;)

When user enters a draft, there are some possibilities:

1. For a new thread
1-1. message is done, but recipient list is empty: user might want to add some recipients
1-2. recipient is done, but message is empty: user might want to type message
1-3. message is partially done: user might want to append new message content (like your scenario) or edit some part of the message (not at the end)

2. For an existing thread
2-1. same as 1-3.
2-2. just want to read the existing messages in this thread

I think my proposals can satisfy more scenarios.

> Checking right now master, when you enter in the draft the focus is in in
> the "to" input and the keyboard is shown so the bug is not fixed yet
> according to your proposal, is it correct?

Sorry for the misleading, I didn't really mean the current master fixed this bug. I meant my proposal will fix this bug. :)
Flags: needinfo?(ofeng)
Reporter

Comment 9

5 years ago
> > according to your proposal, is it correct?
> 
> Sorry for the misleading, I didn't really mean the current master fixed this
> bug. I meant my proposal will fix this bug. :)

Thanks a lot Omega for your explanation! Crystal clear now
Omega, Steve also asked you about Forwarding a message :) In that case, I think we should focus the recipient panel.
Flags: needinfo?(ofeng)
(In reply to Julien Wajsberg [:julienw] from comment #10)
> Omega, Steve also asked you about Forwarding a message :) In that case, I
> think we should focus the recipient panel.

Yeah, it makes sense to focus the recipient panel when forwarding a message.
Flags: needinfo?(ofeng)
Unassigning this per kumar's request until we have a clearer direction on how to move forward.
Assignee: rishav006 → nobody
Mentor: felash
Whiteboard: [mentor=:julienw][lang=js] → [lang=js]
Assignee

Comment 13

5 years ago
Created a patch for positioning cursor at the end of text message. The user will have the ability to continue typing the message if needed.
Attachment #8444062 - Flags: review?(schung)
Attachment #8444062 - Flags: review?(felash)
Hi Lana, thanks for the patch and it works fine! Could you please rebase the patch to squash the merge commit?
Assignee: nobody → lana.scravaglieri
Assignee

Comment 15

5 years ago
Hi, thanks for the review. Actually the second commit was a mistake I didn't noticed before pushing. I removed it and rebased the patch.
Is it all right ?
Comment on attachment 8444062 [details] [review]
patch for cursor at the end of text message

Please see my comment in https://github.com/mozilla-b2g/gaia/pull/20857/files#discussion_r14125905, and request review again, thanks!
Attachment #8444062 - Flags: review?(schung)
Attachment #8444062 - Flags: review?(felash)
Comment on attachment 8444062 [details] [review]
patch for cursor at the end of text message

Hi Lana, thanks for the new patch and it's even better than I suggested. Please see https://github.com/mozilla-b2g/gaia/pull/20857#issuecomment-47053366 for the unit test part. I think it's fine without it, but feel free to ask if you have question about the test, thanks :)
Attachment #8444062 - Flags: review+
In master: ef9a48acb5c30dd8ddac65f765d15df707dfa7db
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Reporter

Updated

5 years ago
Depends on: 1032166
Depends on: 1065585
No longer depends on: 1065585
Depends on: 1043682
Duplicate of this bug: 1084159

Comment 20

5 years ago
Posted video verify_video.MP4
This issue has been verified successfully on Flame v2.1
See attachment: verify_video.MP4
Reproducing rate: 0/5
Flame 2.1 versions:
Gaia-Rev        5372b675e018b6aac97d95ff5db8d4bd16addb9b
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/f34377ae402b
Build-ID        20141127001201
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141127.035005
FW-Date         Thu Nov 27 03:50:16 EST 2014
Bootloader      L1TC00011880

Updated

5 years ago
Status: RESOLVED → VERIFIED
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.