]>
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/sniff", // has("ie")
6 ], function(declare
, has
, _FormWidget
, _FormValueMixin
){
9 // dijit/form/_FormValueWidget
11 return declare("dijit.form._FormValueWidget", [_FormWidget
, _FormValueMixin
],
14 // Base class for widgets corresponding to native HTML elements such as `<input>` or `<select>`
15 // that have user changeable values.
17 // Each _FormValueWidget represents a single input value, and has a (possibly hidden) `<input>` element,
18 // to which it serializes it's input value, so that form submission (either normal submission or via FormBind?)
21 // Don't attempt to mixin the 'type', 'name' attributes here programatically -- they must be declared
22 // directly in the template as read by the parser in order to function. IE is known to specifically
23 // require the 'name' attribute at element creation time. See #8484, #8660.
25 _layoutHackIE7: function(){
27 // Work around table sizing bugs on IE7 by forcing redraw
29 if(has("ie") == 7){ // fix IE7 layout bug when the widget is scrolled out of sight
30 var domNode
= this.domNode
;
31 var parent
= domNode
.parentNode
;
32 var pingNode
= domNode
.firstChild
|| domNode
; // target node most unlikely to have a custom filter
33 var origFilter
= pingNode
.style
.filter
; // save custom filter, most likely nothing
35 while(parent
&& parent
.clientHeight
== 0){ // search for parents that haven't rendered yet
37 var disconnectHandle
= _this
.connect(parent
, "onscroll",
39 _this
.disconnect(disconnectHandle
); // only call once
40 pingNode
.style
.filter
= (new Date()).getMilliseconds(); // set to anything that's unique
41 _this
.defer(function(){ pingNode
.style
.filter
= origFilter
; }); // restore custom filter, if any
45 parent
= parent
.parentNode
;