Changes between Initial Version and Version 3 of Ticket #11145


Ignore:
Timestamp:
May 31, 2010, 8:12:14 AM (9 years ago)
Author:
bill
Comment:

I got some code that was almost working as per (3) above, where the <textarea> was wrapped by an inline-block <div>, and the size and padding was on the <textarea> node, but the border was on the <div>. However, it fails for a CSS width setting in percentage, like in test_TextArea.html with the width: 33% test case. height: x% is also broken, but apparently that has never worked on IE due to a browser bug.

The width: x% problem is difficult to solve. I tried setting width: 33% on the wrapper <div> and width: 100% on the <textarea>:

<div style="position: relative; width: 33%; border: 5px solid blue;">
	<textarea style="width: 100%; padding: 20px; height: 300px; overflow: auto;">
               textarea w/wrapper div at 33% width, textarea at 100%
        </textarea>
</div>

But, since that adjusts the <textarea>'s content-box size rather than border-box size, the <textarea> overflows the <div>, except in IE quirks mode. Modern browser will allow setting border-box sizing on the <textarea>, solving that problem, but not IE6/IE7. display: block also doesn't work.

An alternate approach is to change placeHolder to write text directly into the <input>/<textarea>. That was actually the original design (see original patch in #3286), but we didn't check it in because when a form is submitted (via old style HTML form submit, rather than XHR), the hint text written in the <input>/<textarea> gets submitted as though the user had typed it in. This can be overcome by changing all the widgets with placeHolder text to extend MappedTextBox... or alternately in 2.0 just desupport direct form submission, assuming that everyone does it via XHR.

So, I'm retreating on this feature for now.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11145

    • Property Owner set to bill
    • Property Status changed from new to assigned
    • Property Milestone changed from tbd to 2.0
    • Property Summary changed from placeHolder parameter does not work for dijit.form.SimpleTextarea widgets to TextArea: placeHolder parameter does not work for dijit.form.SimpleTextarea widgets
  • Ticket #11145 – Description

    initial v3  
    11Hi,
    2 in the release notes it says that the placeholder HTML5 parameter has been implemented for all textbox widgets. dijit.form.SimpleTextarea is a textbox widgets but the placeholder parameter doesn't seem to be working for it. See attached test file.
    3 This ticket should be assigned to LiuCougar.
     2in the release notes it says that the placeholder HTML5 parameter has been implemented for all textbox widgets. dijit.form.!SimpleTextarea is a textbox widgets but the placeholder parameter doesn't seem to be working for it. See attached test file.
     3This ticket should be assigned to !LiuCougar.