Ticket #4979 (closed enhancement: invalid)
Textarea: Refactor to use <textarea> node rather than content-editable <div>
| Reported by: | rcoup | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Dijit | Version: | 0.9 |
| Severity: | normal | Keywords: | 4alex |
| Cc: | alex, doughays |
Description
(Filed on behalf of Alex)
Currently Textarea claims it's just a textarea that supports resizing with content.
Except that:
- It uses an IFRAME or ContentEditable? DIV depending on browser.
- That means lots of accessibility/event/focus-handling code wrt the rest of the page.
- Nearly every method is a big if-else block on whether its using an IFRAME or a DIV.
- The DIV/IFRAME is written as an inline conditional TemplateString? with inline javascript via <script> tags.
- It processes some HTML tags via ~15 uncommented regexes, to replace <br/>, <p>, <div>, >, etc.
Fundamentally, wouldn't it just be easier to be a TEXTAREA that sizes?
phiggins(?) pointed out there is a problem in FF detecting the size of content in a textarea (to shrink height, growing is ok), but surely there's a simpler workaround than going to these lengths? (helpfully solving #4929 & #4137).
Change History
Note: See
TracTickets for help on using
tickets.