Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in Chrome caused by JavaScript 'indexOf' method #4

Closed
szilardd opened this issue Jan 6, 2012 · 3 comments
Closed

Issue in Chrome caused by JavaScript 'indexOf' method #4

szilardd opened this issue Jan 6, 2012 · 3 comments

Comments

@szilardd
Copy link

szilardd commented Jan 6, 2012

I have the following 'indexOf' polyfill defined in one of my javascript files (because IE 7 doesn't support it natively):

if (!Array.indexOf) {
Array.prototype.indexOf = function (obj, start) { //implementation not relevant }
}

Only in Chrome (I'm using the latest version), when I use Visual Event (either versions), the 'indexOf' method is shown as a 'click' event on all anchor tags (in Firefox it's working fine). I'm using jQuery 1.6.4.

This is the description of the event shown by Visual Event:

click event subscribed by jQuery 1.6.4 (trigger event)
Function defined on line 55 in overrides.js

Hope this helps.

Thanks for this tool, it helps me a lot in optimizing my website!

@DataTables
Copy link
Collaborator

How very odd! Thanks for the bug report - I'll look into it.

@ghost ghost assigned DataTables Jan 6, 2012
@DamianFekete
Copy link

@szilardd You shouldn't test if (!Array.indexOf), because Array.indexOf can be undefined, although [].indexOf is defined. (and I know the comment is old, but so is the issue :) )
In Firefox it seems that Array.indexOf is defined too: Array.indexOf([0,1,2,3], 2) === 2

@szilardd
Copy link
Author

szilardd commented May 6, 2014

@tehnicaorg: Thank you, kind sir! You are right, though that should not affect Visual Event. Anyways, I haven't had any problems since, so the issue can be closed as far as I'm concerned

@szilardd szilardd closed this as completed May 6, 2014
@DataTables DataTables removed their assignment May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants