Open pauloya opened 8 years ago
@pauloya We're seeing the same issue. Thanks for posting this, will try the fix!
@pauloya We took a slightly different approach if you're interested:
FastClick.prototype.sendClick = function (targetElement, event) {
window.setTimeout(originalFunction.bind(this, targetElement, event));
}
Hi, I don't think our fix is relevant, because we minify and the function is renamed anyway, and we still get errors. We did a similar fix on our side, making it asynchronous.
I'm still confused as to why an ajax send would trigger fastclick. Sounds like doing the async call doesn't solve the real problem, but just the symptom.
There is a similar issue reported here: https://stackoverflow.com/questions/29992980/debugging-digest-already-in-progress-error/36839750#36839750
Any word on whether the above fix might find its way into the source?
anyone mind sharing more details around how this problem was "fixed" did you just overwrite the implementation of sendClick
to wrap the dispatchEvent
in a setTimeout
function?
I've published a PR at #533.
Hi, We were getting errors with a callstack that looked like this:
The strange thing here is that ajax native
send
seems to call theonTouchEnd
function. We could replicate the problem by touching the screen while an ajax call was pending (I'm not completely sure of the internals, but we could always replicate by touching the screen at a point where ajax would run).This didn't happen in the browser, happened only within the cordova app in iOS.
We were able to fix it by renaming the function bind to fcBind. I believe this code somehow hooked event handlers with events it wasn't supposed to.
Like I said, renaming the function
bind()
tofcBind()
fixed it. I thought I would leave this here in case someone else has a similar issue.