10

This Safari Bug is sooo bad, really hard to find it. (It initializes new variables with the element where id and variable name is the same, why?)

Comments
  • 0
    I would guess the code was run 2 times and the first time only silently. I dunno why.
  • 0
    Actually it is an intended feature of the js console (but if the variables are init at runtime its definitely a bug) try it in chrome and call a non-declared variable which coincides with rhe id of an element ;) its supposed to save you time when debugging
  • 0
    @jsmrcaga Google maps didnt work on a customers Site in Safari, I don't think it's a Feature :D searched for a while to find this :/
  • 0
    Well @FirePanther , that's a huge problem then! ^^ have you reported yet?
  • 1
    @jsmrcaga No, didn't think of that, will do 👍
  • 0
    Didn't you hear? Apple decided it would be easier to just use "var test" instead of "document.getElementById('test')"

    The rest of the browsers will follow
  • 0
    I too have experienced that. :/
  • 1
    It's not just safari that's doing it. I believe both chrome and edge behave in the same manner. Not sure if it happens when initializing it with car though.
  • 1
    @Rocket3G Google maps didn't work on safari but worked on chrome for us, this was the reason, so in chrome this shouldn't happen 👍
  • 0
    @FirePanther, in chrome i have experienced the same thing, however the variable which holds the element (and is named as its id) is only initialized when called and being undefined. But if they are initialized when parsing html, or declaring with var (which seems to.be the problem with safari) its quite a problem, since a lot of mac people dont even bother downloading another browser...
Add Comment