luking-dev / webiopi

Automatically exported from code.google.com/p/webiopi
0 stars 0 forks source link

Javascript error in Opera #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. load any page using webiopi.js in opera
2. JS error in webiopi.js:33: a.substr is not a function

WebIOPi version used?
=> 0.6

For Javascript side bugs, Browser?
=> opera 12.15

Please provide any additional information below.

I think this piece of code in webiopi.js:42 can never work:

 (window.opera != undefined && isMobileUserAgent(window.opera))

window.opera is not a string object, hence it makes no sense to call substr.

With that check removed, everything seems to work. Browser detection should 
still work with navigator.userAgent.

Original issue reported on code.google.com by wrtlpr...@gmail.com on 7 Jun 2013 at 8:17

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by tro...@trouch.com on 27 Nov 2013 at 9:31

GoogleCodeExporter commented 9 years ago

Original comment by tro...@trouch.com on 4 Jan 2014 at 9:00

GoogleCodeExporter commented 9 years ago

Original comment by tro...@trouch.com on 4 Jan 2014 at 9:01

GoogleCodeExporter commented 9 years ago
No error with Opera 19

Original comment by tro...@trouch.com on 31 Jan 2014 at 3:47