jamesallardice / Placeholders.js

A JavaScript polyfill for the HTML5 placeholder attribute
http://jamesallardice.github.io/Placeholders.js
948 stars 232 forks source link

[IE11] Placeholder.nativeSupport not working #105

Open CDRO opened 8 years ago

CDRO commented 8 years ago

In some cases global.Placeholders is undefined, this is specially the case with IE11 (don't ask me why, I couldn't tell). Therefore the following snippet will fail:

if ( !global.Placeholders.nativeSupport ) {

This willl work: if ( !global.Placeholders || !global.Placeholders.nativeSupport ) {