PDA

View Full Version : [CLOSED] Behavior of 'Empty text' in different browsers



supera
Sep 12, 2012, 2:11 PM

Vladimir
Sep 12, 2012, 3:10 PM
Hi

ExtJS uses native HTML5 placeholder if browser supports it


Note that for browsers that support it, setting this property will use the HTML 5 placeholder attribute, and for
older browsers that don't support the HTML 5 placeholder attribute the value will be placed directly into the input
element itself as the raw value. This means that older browsers will obfuscate the emptyText value for
password input fields.


WebKit (Chrome) hides placeholder after input a value only
http://instanceof.me/post/15394689493/webkit-placeholder-better-than-the-w3c-specs

It is Chrome behaviour (not ExtJS/Ext.Net)

supera
Sep 12, 2012, 3:27 PM
Ok!

My only problem is the Firefox and the empty text color changed to black when the field got focus...

HTML 5 behavior too??

Any workaround to this behavior?

Vladimir
Sep 12, 2012, 11:49 PM

Vladimir
Sep 13, 2012, 12:03 AM
I updated FF to latest version (15.0.1) and now i am able to reproduce described behaviour
At this moment, I can suggest to force do not use HTML 5 placeholders
Add the following script to page head


<script type="text/javascript">
Ext.onReady( function(){
Ext.supports.Placeholder = false;
});
</script>

supera
Sep 13, 2012, 12:11 PM
Hi Vladimir!!!

Thanks a lot for your help!!!

You think that I should disable placeHolder for all browsers? I think that I can disable placeHolder only when the browser is FireFox... You recommend this?

Vladimir
Sep 13, 2012, 2:12 PM
You think that I should disable placeHolder for all browsers? I think that I can disable placeHolder only when the browser is FireFox... You recommend this?

As you like, if you want you can disable fro Firefox only

supera
Sep 13, 2012, 2:26 PM
Ok!

Thanks a lot, Vladimir