I am using this plugin in node with jsdom and using the plain target throws an error in bililiteRange.js:
TypeError: Cannot call method 'replace' of null
It traces back to the line I have changed in the commit. I guess the issue is that pure dom elements do not automatically get a focus method with jsdom. However, using the jquery object eliminates this problem.
Just looked into the jQuery code and basically, they surround the call to .focus() with some try{} catch{} so I think this is fine.
Thanks for the fix!
I am using this plugin in node with jsdom and using the plain
target
throws an error in bililiteRange.js:It traces back to the line I have changed in the commit. I guess the issue is that pure dom elements do not automatically get a focus method with jsdom. However, using the jquery object eliminates this problem.