summaryrefslogtreecommitdiff
path: root/lib/dijit/form/_FormValueWidget.js.uncompressed.js
diff options
context:
space:
mode:
authorRichard Beales <[email protected]>2013-03-18 07:32:01 +0000
committerRichard Beales <[email protected]>2013-03-18 07:32:01 +0000
commit7c97d17aaf373339a8bcd917ad59ca6018148f0d (patch)
tree5a3c04f0f9529be392c1263d3feb75806eb43797 /lib/dijit/form/_FormValueWidget.js.uncompressed.js
parent70db7424e7068701e60cc5bcdfe8f858be508179 (diff)
parentc670a80ddd9b03bd4ea6d940a9ed682fd26248d7 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'lib/dijit/form/_FormValueWidget.js.uncompressed.js')
-rw-r--r--lib/dijit/form/_FormValueWidget.js.uncompressed.js51
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/dijit/form/_FormValueWidget.js.uncompressed.js b/lib/dijit/form/_FormValueWidget.js.uncompressed.js
new file mode 100644
index 000000000..9edbf2e83
--- /dev/null
+++ b/lib/dijit/form/_FormValueWidget.js.uncompressed.js
@@ -0,0 +1,51 @@
+define("dijit/form/_FormValueWidget", [
+ "dojo/_base/declare", // declare
+ "dojo/sniff", // has("ie")
+ "./_FormWidget",
+ "./_FormValueMixin"
+], function(declare, has, _FormWidget, _FormValueMixin){
+
+// module:
+// dijit/form/_FormValueWidget
+
+return declare("dijit.form._FormValueWidget", [_FormWidget, _FormValueMixin],
+{
+ // summary:
+ // Base class for widgets corresponding to native HTML elements such as `<input>` or `<select>`
+ // that have user changeable values.
+ // description:
+ // Each _FormValueWidget represents a single input value, and has a (possibly hidden) `<input>` element,
+ // to which it serializes it's input value, so that form submission (either normal submission or via FormBind?)
+ // works as expected.
+
+ // Don't attempt to mixin the 'type', 'name' attributes here programatically -- they must be declared
+ // directly in the template as read by the parser in order to function. IE is known to specifically
+ // require the 'name' attribute at element creation time. See #8484, #8660.
+
+ _layoutHackIE7: function(){
+ // summary:
+ // Work around table sizing bugs on IE7 by forcing redraw
+
+ if(has("ie") == 7){ // fix IE7 layout bug when the widget is scrolled out of sight
+ var domNode = this.domNode;
+ var parent = domNode.parentNode;
+ var pingNode = domNode.firstChild || domNode; // target node most unlikely to have a custom filter
+ var origFilter = pingNode.style.filter; // save custom filter, most likely nothing
+ var _this = this;
+ while(parent && parent.clientHeight == 0){ // search for parents that haven't rendered yet
+ (function ping(){
+ var disconnectHandle = _this.connect(parent, "onscroll",
+ function(){
+ _this.disconnect(disconnectHandle); // only call once
+ pingNode.style.filter = (new Date()).getMilliseconds(); // set to anything that's unique
+ _this.defer(function(){ pingNode.style.filter = origFilter; }); // restore custom filter, if any
+ }
+ );
+ })();
+ parent = parent.parentNode;
+ }
+ }
+ }
+});
+
+});