Dave's WordPress Live Search
Plugin throws javascript error in console on resize. (2 posts)

  1. kjfrank
    Posted 3 years ago #

    When I resize my browser window I get this error in chrome developer console:

    "Uncaught TypeError: Cannot read property 'left' of null" and it is coming from "daves-wordpress-live-search.min.js".

    I suspect that it is from here in the code:

    a.left += parseInt(DavesWordPressLiveSearchConfig.xOffset, 10);

    Any idea how to fix this?


  2. Dave Ross
    Plugin Author

    Posted 3 years ago #

    Version 3.2 is coming out in a few minutes. It has a fix for this.

    That's pretty much what the error was. If no search box had focus, a was null. I just put a guard condition around that code so it doesn't try to reposition a search box that isn't there.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Dave's WordPress Live Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic