#280 Array.indexOf not supported in IE8

Future_Requests
open
nobody
None
1
2013-08-21
2013-08-21
Anonymous
No

IE versions before version 9 do not support Array.indexOf as used in (e.g.) js/edit_entry.js.php line 45 (referring to mrbs-1.4.10). Please include a compatibility implementation of the function. You can find one on http://stackoverflow.com/a/3629211, and a more recent one on MDN (see "from MDC" link on that page).

[Personally I use recent versions of IE of course, if at all. But there are still users of IE8 out there, such as my client. Rather than trying to convince all of them or change all occurrences of this function in your code, providing the compatibility implementation seems easiest.]

Discussion

  • John Beranek

    John Beranek - 2013-08-21

    Alternatively, I imagine it could be done with some jQuery invocation

     
  • Campbell Morrison

    Yes, I'm just looking at it now. I think $.inArray() is the answer. Will check in a fix later.

    Campbell

     
  • Campbell Morrison

    Fixed in Rev 2573. I think the example you quoted above was the only instance.

    Campbell

     


Anonymous

Cancel  Add attachments