New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 377811 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 377850
Owner: ----
Closed: May 2014
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Empty <button> tag at start of edit area corrupts content

Reported by cacycl...@gmail.com, May 27 2014

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36

Example URL:
All Wikipedias/MediaWiki installations when using the editor wikEd

Steps to reproduce the problem:
1. In an iframe in designmode or a contenteditable container, load code starting with a button tag (e.g. "<button></button>text" or "<button>BUTTON</button>text") (please see the attached testcase)
2. Delete the edit content (by any method)

What is the expected behavior?

What went wrong?
1. The empty button element stays at the beginning and is undeletable and unselectable
2. When editing the non-empty button, a number of weird effects can happen:
2.1 The button disappears, but any new content starts in the middle of the line (if there is no space after the button)
2.2 The button text gets emptied and we have the same situation as above for an empty button tag
2.3 When only a labeled button stays, it is no longer possible to type normal text outside the button
2.4 Sometimes selecting all inside the edit area selects all on the whole page

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 35.0.1916.114  Channel: stable
OS Version: 6.3
Flash Version: Shockwave Flash 13.0 r0

It works fine for non-empty button tags and other empty tags such as div and span (as long as they are followed by a space - I will file a separate bug report for this)
 
testcase Chrome empty button at start.html
2.2 KB View Download

Comment 1 by cacycl...@gmail.com, May 27 2014

Another weirdness:

When left with only the unselectable and undeletable empty button, using the backspace key inside the edit area results in going back in history to the previous page, something that Chrome does only when the focus is on the background page outside the edit area.

Comment 2 by cacycl...@gmail.com, May 27 2014

This bug might or might not be related to the following other bugs:

-  Bug 377850 : HTML tags at start of edit area and not followed by space corrupt content
- Webkit 34377 (https://bugs.webkit.org/show_bug.cgi?id=34377): Select-All does not select all content (HTML editor for iframes in designmode)
-  Bug 271445 : A range returned by Selection.getRangeAt() should be identical to a range set by Selection.addRange()

Comment 3 by tkent@chromium.org, May 29 2014

Labels: -Cr-Content Cr-Blink-Editing
Cc: sdayala@chromium.org
Labels: Needs-Feedback
Mergedinto: 377850
Status: Duplicate
please unmerge, if it is not a same issue.377850 has more information then this.

Sign in to add a comment