Open Bug 854272 Opened 7 years ago Updated 5 years ago

Undo breaks in a textarea when overflow property is changed.


(Core :: DOM: Editor, defect)

Not set




(Reporter: adel.smee, Unassigned)


(Keywords: testcase)


(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22

Steps to reproduce:

I wrote this code to resize a textarea when the user types lots of stuff into it:

<script type="text/javascript">

function breakundo() {
    var myElement = document.getElementById("mine"); = "scroll"; = myElement.scrollHeight; = "hidden";


        <textarea id="mine" oninput="breakundo()" style="overflow: hidden">Placeholder</textarea>

While your suggested method of resizing a textarea works ( it does a little hiccup every time the user types a new line, so I'd much prefer to get this way working as it is nice and smooth.

Actual results:

The problem is my users can no longer Undo any text typing they've done into the textarea.

Expected results:

Undo should work. If I get rid of this line: = "scroll";

... and just set the height to some number then Undo still works as I would expect.
This is a similar bug to: but I don't require a focus or blur event to cause Undo to stop working.
Confirmed with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130325 Firefox/22.0 ID:20130325093524 CSet: 4d3250f3afea (FWIW, this never worked).

WFM in Chrome 27 and MSIE 10.
Component: Untriaged → Layout: Form Controls
Ever confirmed: true
Keywords: testcase
OS: Mac OS X → All
Product: Firefox → Core
Hardware: x86 → All
Version: 19 Branch → Trunk
Component: Layout: Form Controls → Editor
You need to log in before you can comment on or make changes to this bug.