Giter VIP home page Giter VIP logo

Comments (6)

mathiasbynens avatar mathiasbynens commented on May 21, 2024

That’s the native placeholder implementation in Safari, not the plugin.

Take a closer look at that screenshot:

Your current browser natively supports placeholder for input and textarea elements. The plugin won’t run in this case, since it’s not needed. If you want to test the plugin, use an older browser ;)

from jquery-placeholder.

joeyespo avatar joeyespo commented on May 21, 2024

Oh, interesting, you're right. False alarm. Thanks for the quick response!

from jquery-placeholder.

ghepting avatar ghepting commented on May 21, 2024

Is there a way to over-ride Safari's native implementation in this case and use the plugin regardless of the native support?

from jquery-placeholder.

mathiasbynens avatar mathiasbynens commented on May 21, 2024

@ghepting Sure, you could get rid of the feature test to make sure the plugin is used in all browsers.

Change this line:

isTextareaSupported = 'placeholder' in document.createElement('textarea'),

…into this:

isTextareaSupported = false,

That should do the trick.

Disclaimer: I wouldn’t recommend overriding native browser behavior like this.

from jquery-placeholder.

mufaddalmw avatar mufaddalmw commented on May 21, 2024

@ghepting In which document you are referring to write above code ?

from jquery-placeholder.

ghepting avatar ghepting commented on May 21, 2024

@mufaddalmw this is in https://github.com/mathiasbynens/jquery-placeholder/blob/master/jquery.placeholder.js#L5

from jquery-placeholder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.