You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the clickHander interaction wasn't always correctly triggering in FF in my application. Chrome (and even IE!) worked fine, so I drilled down into wax.mm.js. In the function "templatedGridUrl" I found that the following regex sometimes randomly returned null:
var xyz = /(\d+)/(\d+)/(\d+).[\w._]+/g.exec(url);
I replaced this line with:
var rx = new RegExp("/(\d+)/(\d+)/(\d+).[\w._]+");
var xyz = rx.exec(url);
Ah, thanks so much for tracking this down! Must have run into it a while ago but not fixed it entirely, and it became lore that Firefox somehow had a broken regex implementation, but I had no examples.
I'll do a quick backport for a 4.1.6 release with this fix. Thanks @fredleefarr !
No problem. Just in case you implement the code snippet above and get an error, the backslashes in the regex expression need to be doubled to escape them when used with "new RegExp()".
Firefox has a crazy weird bug in their regex implementation
and this constructs regexes with the official constructor,
every time. A millisecond performance hit is to be expected.
I noticed that the clickHander interaction wasn't always correctly triggering in FF in my application. Chrome (and even IE!) worked fine, so I drilled down into wax.mm.js. In the function "templatedGridUrl" I found that the following regex sometimes randomly returned null:
var xyz = /(\d+)/(\d+)/(\d+).[\w._]+/g.exec(url);
I replaced this line with:
var rx = new RegExp("/(\d+)/(\d+)/(\d+).[\w._]+");
var xyz = rx.exec(url);
And now it seems to be fine. Might just be an issue at my end. I found the solution in some comments in this Stack Overflow question: http://stackoverflow.com/questions/4724701/regexp-exec-returns-null-sporadically
As a side note, I've added a renderer for UtfGrid for .net based on some original code by Dane Springmeyer:
https://github.com/fredleefarr/UTFGrid-Renderer
I couldn't find Dane's original repo so couldn't link to it.
The text was updated successfully, but these errors were encountered: