Site logo

IE8 Placeholder text for Search box

Home Forums Support IE8 Placeholder text for Search box

Home Forums Support IE8 Placeholder text for Search box

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #168342
    Matthew

    Hi,

    In IE8 the placeholder text “Search…” doesn’t appear. It appears there are a number of known solutions: http://stackoverflow.com/questions/15020826/how-to-support-placeholder-attribute-in-ie8-and-9

    Could you add a fix to the next version of the theme please? Note some of the solutions break form submission so watch out!

    Thanks, Matt

    #168407
    Tom
    Lead Developer
    Lead Developer

    Hi Matt,

    Unfortunately the solution means adding a 300 line javascript code to the theme just for IE8 placeholders – not sure how I feel about that.

    If you need to support IE8, give this plugin a try: https://wordpress.org/plugins/html5-placeholder-polyfill/

    It hasn’t been updated in a while, but I took a look at the code and it’s harmless.

    Once installed and activated, add this code into “GP Hooks > wp_footer”:

    <script>
        jQuery('.search-field').placeholder();
    </script>

    That should do it 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.