]>
git.wh0rd.org - tt-rss.git/blob - lib/dijit/form/Textarea.js.uncompressed.js
1 define("dijit/form/Textarea", [
2 "dojo/_base/declare", // declare
3 "dojo/dom-style", // domStyle.set
4 "./_ExpandingTextAreaMixin",
6 ], function(declare
, domStyle
, _ExpandingTextAreaMixin
, SimpleTextarea
){
9 var _ExpandingTextAreaMixin = dijit.form._ExpandingTextAreaMixin;
10 var SimpleTextarea = dijit.form.SimpleTextarea;
14 // dijit/form/Textarea
16 // A textarea widget that adjusts it's height according to the amount of data.
19 return declare("dijit.form.Textarea", [SimpleTextarea
, _ExpandingTextAreaMixin
], {
21 // A textarea widget that adjusts it's height according to the amount of data.
24 // A textarea that dynamically expands/contracts (changing it's height) as
25 // the user types, to display all the text without requiring a scroll bar.
27 // Takes nearly all the parameters (name, value, etc.) that a vanilla textarea takes.
28 // Rows is not supported since this widget adjusts the height.
31 // | <textarea data-dojo-type="dijit.form.TextArea">...</textarea>
34 // TODO: for 2.0, rename this to ExpandingTextArea, and rename SimpleTextarea to TextArea
36 baseClass
: "dijitTextBox dijitTextArea dijitExpandingTextArea",
38 // Override SimpleTextArea.cols to default to width:100%, for backward compatibility
41 buildRendering: function(){
42 this.inherited(arguments
);
44 // tweak textarea style to reduce browser differences
45 domStyle
.set(this.textbox
, { overflowY
: 'hidden', overflowX
: 'auto', boxSizing
: 'border-box', MsBoxSizing
: 'border-box', WebkitBoxSizing
: 'border-box', MozBoxSizing
: 'border-box' });