-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Strange issue with fastclick and angularJS in cordova/phonegap in iOS with the bind function #466
Comments
@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'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: |
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 |
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.
The text was updated successfully, but these errors were encountered: