- Posted by brunofig on December 21, 2006
CSS-based liquid layout has proven successful during the reign of 800-pixel to 1024-pixel screens, but as we use a wider range of devices to access the web, we need more powerful and flexible ways of managing layout. If we want to serve devices whose viewports range from 240 pixels to about 1680 pixels—and with resolution ranging from 72 to 150 pixels per inch—we need a new method.
(read more)
- Posted by brunofig on December 20, 2006
If a value is set using the Sys.Preview.UI.TextBox.set_text, the TextBoxWatermarkBehavior will override the value if the control gains focus.
This happens because the value of the field this._watermarked inside the TextBoxWatermarkBehavior is not changed to true.
The TextBoxWatermarkBehavior only works well for user input.
The workaround for this checking first if the html element has the Behaviour, and if so, set the value using the behaviour:
if (txtCO.get_element().TextBoxWatermarkBehavior){ txtCO.get_element().TextBoxWatermarkBehavior.set_Text("hello world!");}else{ txtCO.set_text("hello world!");}
If the TextBoxWatermarkBehavior where to be changed, the initialize method of the beaviour could check for the existence of the control property in the html element, and if so, attach the text property change event to his keypress event, solving the problem. A issue with this was open at codeplex. Go there and vote.