diff options
author | Richard Beales <[email protected]> | 2013-03-18 07:32:01 +0000 |
---|---|---|
committer | Richard Beales <[email protected]> | 2013-03-18 07:32:01 +0000 |
commit | 7c97d17aaf373339a8bcd917ad59ca6018148f0d (patch) | |
tree | 5a3c04f0f9529be392c1263d3feb75806eb43797 /lib/dijit/form/Textarea.js.uncompressed.js | |
parent | 70db7424e7068701e60cc5bcdfe8f858be508179 (diff) | |
parent | c670a80ddd9b03bd4ea6d940a9ed682fd26248d7 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'lib/dijit/form/Textarea.js.uncompressed.js')
-rw-r--r-- | lib/dijit/form/Textarea.js.uncompressed.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/dijit/form/Textarea.js.uncompressed.js b/lib/dijit/form/Textarea.js.uncompressed.js new file mode 100644 index 000000000..c3c738bdd --- /dev/null +++ b/lib/dijit/form/Textarea.js.uncompressed.js @@ -0,0 +1,42 @@ +define("dijit/form/Textarea", [ + "dojo/_base/declare", // declare + "dojo/dom-style", // domStyle.set + "./_ExpandingTextAreaMixin", + "./SimpleTextarea" +], function(declare, domStyle, _ExpandingTextAreaMixin, SimpleTextarea){ + +// module: +// dijit/form/Textarea + + +return declare("dijit.form.Textarea", [SimpleTextarea, _ExpandingTextAreaMixin], { + // summary: + // A textarea widget that adjusts it's height according to the amount of data. + // + // description: + // A textarea that dynamically expands/contracts (changing it's height) as + // the user types, to display all the text without requiring a scroll bar. + // + // Takes nearly all the parameters (name, value, etc.) that a vanilla textarea takes. + // Rows is not supported since this widget adjusts the height. + // + // example: + // | <textarea data-dojo-type="dijit/form/TextArea">...</textarea> + + + // TODO: for 2.0, rename this to ExpandingTextArea, and rename SimpleTextarea to TextArea + + baseClass: "dijitTextBox dijitTextArea dijitExpandingTextArea", + + // Override SimpleTextArea.cols to default to width:100%, for backward compatibility + cols: "", + + buildRendering: function(){ + this.inherited(arguments); + + // tweak textarea style to reduce browser differences + domStyle.set(this.textbox, { overflowY: 'hidden', overflowX: 'auto', boxSizing: 'border-box', MsBoxSizing: 'border-box', WebkitBoxSizing: 'border-box', MozBoxSizing: 'border-box' }); + } +}); + +}); |