Closed Bug 597017 Opened 12 years ago Closed 12 years ago

Backspace consuming/ignoring extra spaces in plain-text message composition window


(Thunderbird :: Message Compose Window, defect)

Windows 7
Not set


(Not tracked)



(Reporter: themoz, Unassigned)


(Keywords: regression)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20100824 Firefox/3.6.9
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20100825 Thunderbird/3.1.3

When composing a message in Thunderbird 3.1.3 with the plain-text editor, the backspace key is incorrectly consuming (or perhaps more accurately ignoring) extra spaces.  The backspace key should only remove the single character immediately to the left of the cursor.  That should be the case even if several characters to the left of the cursor are all spaces.

I have observed the behavior on Windows 7 and Linux.

Reproducible: Always

Steps to Reproduce:
1. Open a new composition window using the plain-text editor (not the rich-text editor).
2. Type "Foo.  "  Include the spaces.
3. Press backspace.
4. Observe that Thunderbird has deleted the period after "Foo" and moved the cursor to immediately following the second "o" character.
5. Further observe that the spaces were not actually consumed and that you can move the cursor to the right two spaces using your arrow keys.  (This final behavior occurs on Windows 7, but in quick testing it seems the extra spaces were actually consumed on Linux.)
Actual Results:  
The extra spaces are ignored by Thunderbird and the period after "Foo" is consumed by the backspace operation.  The following spaces, however, remain.  Note that you will find the behavior is not consistent during routine use of a composition window.  In routine use, the last non-space character is deleted in some cases while in other cases the cursor is merely positioned immediately to the right of the last non-space character.  Neither behavior is correct, but for consistency, I recommend starting with a fresh composition window.

Expected Results:  
Typing "Foo.  " followed by a backspace should result in the composition window containing "Foo. " with the cursor positioned to the right of the space character.  This is the standard behavior in most applications, including previous versions of Thunderbird.

Only applications for very specific domains (such as source code editors) benefit from multiple white-space characters consumed by a single press of backspace.
Do you have the same results in -safe-mode ( ?
I'm seeing this also with 3.1.3pre 20100824 - been ignoring/living with it. And trunk 2010908 in safe mode

if there's a dup to be made, it's one of these?
Ever confirmed: true
Keywords: regression
Version: unspecified → 3.1
Closed: 12 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 592592
You need to log in before you can comment on or make changes to this bug.