]>
git.wh0rd.org - tt-rss.git/blob - lib/dijit/form/_FormValueWidget.js.uncompressed.js
1 define("dijit/form/_FormValueWidget", [
2 "dojo/_base/declare", // declare
3 "dojo/_base/sniff", // has("ie")
6 ], function(declare
, has
, _FormWidget
, _FormValueMixin
){
9 var _FormWidget = dijit.form._FormWidget;
10 var _FormValueMixin = dijit.form._FormValueMixin;
14 // dijit/form/_FormValueWidget
19 return declare("dijit.form._FormValueWidget", [_FormWidget
, _FormValueMixin
],
22 // Base class for widgets corresponding to native HTML elements such as <input> or <select> that have user changeable values.
24 // Each _FormValueWidget represents a single input value, and has a (possibly hidden) <input> element,
25 // to which it serializes it's input value, so that form submission (either normal submission or via FormBind?)
28 // Don't attempt to mixin the 'type', 'name' attributes here programatically -- they must be declared
29 // directly in the template as read by the parser in order to function. IE is known to specifically
30 // require the 'name' attribute at element creation time. See #8484, #8660.
32 _layoutHackIE7: function(){
34 // Work around table sizing bugs on IE7 by forcing redraw
36 if(has("ie") == 7){ // fix IE7 layout bug when the widget is scrolled out of sight
37 var domNode
= this.domNode
;
38 var parent
= domNode
.parentNode
;
39 var pingNode
= domNode
.firstChild
|| domNode
; // target node most unlikely to have a custom filter
40 var origFilter
= pingNode
.style
.filter
; // save custom filter, most likely nothing
42 while(parent
&& parent
.clientHeight
== 0){ // search for parents that haven't rendered yet
44 var disconnectHandle
= _this
.connect(parent
, "onscroll",
46 _this
.disconnect(disconnectHandle
); // only call once
47 pingNode
.style
.filter
= (new Date()).getMilliseconds(); // set to anything that's unique
48 setTimeout(function(){ pingNode
.style
.filter
= origFilter
}, 0); // restore custom filter, if any
52 parent
= parent
.parentNode
;