Closed Bug 293128 Opened 20 years ago Closed 20 years ago

Backspace key does not work correctly while editing the HTML Source

Categories

(Core :: DOM: Editor, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED EXPIRED

People

(Reporter: masaoud, Assigned: mozeditor)

References

()

Details

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0) I was trying the midas demo available at: http://www.mozilla.org/editor/midasdemo/ If I type the following lines in the html compose area: ----------------------- This is test line 1 This is test line 2 This is test line 3 This is test line 4 ----------------------- Then I select the 'View HTML Source' checkbox. Use the mouse to move the caret to '2' and press the backspace key. I notice that the content being actually deleted is not where the cursor points. The deleted content is before the caret position. Reproducible: Always Steps to Reproduce: 1. Use the HTML editor at http://www.mozilla.org/editor/midasdemo/ 2. Type some content along with some newlines 3. Switch to the 'View HTML Source' mode 4. Set your text caret to some location in the html source 5. Press the backspace key Actual Results: Content at the cursor is not deleted, content before the cursor gets deleted. Expected Results: Content at the cursor should have been deleted
Works for me. Backspace is supposed to delete the character _before_ the cursor (that's why it's called "backspace"). Use the Delete key if you want to delete the character at the cursor position.
Sorry for the miscommunication Elmar! What I meant was the backspace key does not delete the character immediately before the cursor (caret). The backspace key ends up deleting characters much before the cursor. In my case if I place the cursor at '2' and press the backspace key, the content that actually gets deleted is 4 characters before the cursor. Also do ensure that you provide the newline characters appropriately while typing in the specified HTML. (In reply to comment #1) > Works for me. > Backspace is supposed to delete the character _before_ the cursor (that's why it's > called "backspace"). Use the Delete key if you want to delete the character at the > cursor position.
This still works for me, I don't see any misbehaviour regarding the backspace key when following your steps to reproduce. You might try a newer Firefox release. Tested in Firefox 1.0.3 on Linux/i686.
WFM Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050504 Firefox/1.0+ Please resolve as WFM
I just downloaded the latest version of Mozilla Firefox 1.0.3: ----------- Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 ----------- I am able to see the same problem with the backspace key happening for this version too. This problem occurs on Windows only. It does not occur on Linux or on Macintosh. The steps that I tried are as follows: 1. Go to the url: http://www.mozilla.org/editor/midasdemo/ 2. Type in the following content in the text area: --------------------------- This is test line 1 This is test line 2 This is test line 3 This is test line 4 --------------------------- 3. Use any form of formatting for the above text. In the sense, format part of the text as 'Bold', part of the text as 'Underline' and so on. 4. Click on the 'View HTML Source' checkbox. This will show you the HTML source for the content that you just typed in. 5. Place the text caret somewhere in the middle of the HTML Source. 6. Press the backspace key. Notice the character being deleted is not the one at the text caret. The deleted character is way before the expected character. 7. Try placing the text caret at different locations in the text. The same behavior is observed most of the times. Is this a known issue of Mozilla Firefox on Windows ?
Note that the bug does not happen if you cut and paste the example. You have to type it, since cutting and pasting it add some style information that prevent the bug from happenning. This is reproducible on Firefox 1.0.4, Mozilla 1.7.x
I do see this in Firefox 1.0.4, but not with a current trunk build on Windows. Masaoud, do you see this with the Deer Park preview, say? 1.0.x (and anything else off the 1.7 Gecko branch) is using a layout engine from over a year ago; testing rendering/editing/layout bugs with it is usually pretty pointless.
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.