Hi,

when testing my application with the trunk, I noticed the following
issue, that does not happen with dojo 1.6 or lower (hence the
"possible regression" in the title).
The issue is specific to IE, and happens when the TextArea resize() is
triggered. In some situation, the height value that is assigned
to "textarea.style.height" can be negative, throwing an "invalid
argument" error :

in dijit/form/_ExpandingTextAreaMixin.js, l.89 :
var currentHeight = textarea.style.height;
if(!(/px/.test(currentHeight))){
currentHeight = textareaScrollHeight();
textarea.rows = 1;
textarea.style.height = currentHeight + "px";
}
var newH = parseInt(currentHeight) + textareaScrollHeight() -
textarea.clientHeight;
var newHpx = newH + "px";
if(newHpx != textarea.style.height){
textarea.rows = 1;
textarea.style.height = newHpx; <<<<<<< error if newHpx is < 0
}

In my use case, the computed newH value is < 0, which gives the
exception. I would say 'newH' should be checked against negative
value.

Since the exact scenario where I get this error is still not very
clear (the use case is an "inline text editor" (double-click on a gfx
text shape pops a textarea to edit the label)), I have not created a
testcase yet, nor filled a ticket. Tell me if you think a ticket is
needed, I will create it.

thx
--
Patrick

Search Discussions

  • Patrick Ruzand at Jun 3, 2011 at 4:52 am
    Hi,
    when testing my application with the trunk, I noticed the following
    issue, that does not happen with dojo 1.6 or lower (hence the
    "possible regression" in the title).
    The issue is specific to IE, and happens when the TextArea resize() is
    triggered. In some situation, the height value that is assigned
    to "textarea.style.height" can be negative, throwing an "invalid
    argument" error
    I finally could reproduce it on a testcase.
    I created a ticket (testcase + patch): http://bugs.dojotoolkit.org/ticket/13166

    thx
    Patrick

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdojo-contributors @
categoriesdojo
postedJun 1, '11 at 8:12a
activeJun 3, '11 at 4:52a
posts2
users1
websitedojotoolkit.org

1 user in discussion

Patrick Ruzand: 2 posts

People

Translate

site design / logo © 2022 Grokbase