Last Comment Bug 746737 - Filelink URL insertion should not move the users selection point
: Filelink URL insertion should not move the users selection point
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Message Compose Window (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: Thunderbird 14.0
Assigned To: Mike Conley (:mconley) - Getting through review / needinfo backlog
:
:
Mentors:
Depends on:
Blocks: BigFiles
  Show dependency treegraph
 
Reported: 2012-04-18 14:17 PDT by Mike Conley (:mconley) - Getting through review / needinfo backlog
Modified: 2012-04-20 13:56 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed


Attachments
Patch v1 (6.00 KB, patch)
2012-04-20 11:41 PDT, Mike Conley (:mconley) - Getting through review / needinfo backlog
mozilla: review+
mozilla: approval‑comm‑aurora+
Details | Diff | Splinter Review

Description User image Mike Conley (:mconley) - Getting through review / needinfo backlog 2012-04-18 14:17:52 PDT
STR:

1)  Start a Filelink upload
2)  Start typing in the compose window, and don't stop until the upload completes

What happens?

The attachment URL gets inserted, and the user's selection is moved below it.

What's expected?

The users selection should not have changed from where they were.

This is quite disruptive to the flow of email composition.
Comment 1 User image Mike Conley (:mconley) - Getting through review / needinfo backlog 2012-04-18 14:18:37 PDT
It used to be that the selection didn't move - but I think that regressed when I beefed up the URL insertion logic.  I don't think this is too hard a fix.
Comment 2 User image Mike Conley (:mconley) - Getting through review / needinfo backlog 2012-04-19 06:51:58 PDT
So it turns out this isn't a problem if we're in the middle of typing a line.

If, however, the last character we typed was a newline, *then* our selection was moved.

So, new STR:

1)  Start a Filelink upload
2)  Type a few characters in the compose window, and press enter to start a new line
3)  Wait for upload to complete

What happens?

The attachment URL gets inserted, and the selection is now below the inserted URL.

What's expected?

The selection should be where the user left it - on that first newline.
Comment 3 User image Mike Conley (:mconley) - Getting through review / needinfo backlog 2012-04-20 11:41:22 PDT
Created attachment 617054 [details] [diff] [review]
Patch v1

Ok, one final modification to my STR - you need *two* newlines after any text in order to observe the problem.

This patch fixes the problem and adds a test.
Comment 4 User image David :Bienvenu 2012-04-20 13:49:37 PDT
Comment on attachment 617054 [details] [diff] [review]
Patch v1

mozmill tests pass w/ patch...
Comment 5 User image Mike Conley (:mconley) - Getting through review / needinfo backlog 2012-04-20 13:56:47 PDT
Thanks!

Committed to comm-central as http://hg.mozilla.org/comm-central/rev/a964c299bcec
Committed to comm-aurora as http://hg.mozilla.org/releases/comm-aurora/rev/8654fc069828

Note You need to log in before you can comment on or make changes to this bug.