Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Mar 30, 2010 22:12:18 GMT -8
With the recent update to Opera for windows (v10.51 as of this writing) Proboards users who use this browser have found they can no longer click on the UBBC and smileys while posting. This is because Opera has apparently dropped the Internet Explorer method of determining user selection, namely document.selection (although I could find no mention of this change in the recent change logs a simple tests for typeof document.selection now returns undefined) The add() function currently in use by Proboards rather than testing directly for method support uses a one-off test by testing for attachEvent and assuming if that is supported then document.selection must be too. The problem is now that Opera no longer uses IE selection method but still uses IE event binding method, it gets served the wrong code path. Judging from the initial response from the Proboards staff there are absolutely no plans to fix this in the current version since all responses state it is "known problem" and will be corrected in V5. I have however gotten my Opera using tags again by installing this code. edit:
Note that the simplest fix would be for Proboards to change var isIE = (document.attachEvent)? true : false; in their source to var isIE = (document.attachEvent && !window.opera)? true : false;The more resilient fix would be to test directly for the supported method rather than testing if "isIE"
|
|
|
Post by Wormopolis on Mar 30, 2010 23:02:30 GMT -8
It seems like a small change to make.. its curious why they cant make the base code change?
|
|
Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Mar 31, 2010 0:00:09 GMT -8
Think how Microsoft feels every time they have to release a patch to patch a screw-up caused by a previous patch. My guess is it comes down to choice between the hectic schedule of coding V5 or having to pull resources to regression test a patch that would only benefit a fraction of the user base but affect millions if it goes bad...
|
|
|
Post by Wormopolis on Mar 31, 2010 8:39:52 GMT -8
well I guess that would depend on how "!window.opera" could go bad...
|
|
Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Mar 31, 2010 18:38:46 GMT -8
That isIE is defined globally and then referenced in the add() function. I'm almost positive I've seen it referenced in other native Proboards functions to determine who can handle IE's code paths and who should go the W3C path so suddenly giving Opera the W3C path really could have adverse effects...
As I said before the true fix would be to do a complete rewrite to test for capabilities rather than sniffing for browser then assuming the entire set of capabilities available in one browser would be supported by a browser that selectively supports only certain capabilities.
By testing for capabilities I mean if you wanted to bind an event you would directly test for the method you would like to use, namely document.attachEvent or document.addEventListener rather than relying on some previous test that said this browser matches the profile of a specific browser therefore must support a known set of methods.
Let's say for example one day Google decided it would add IE's binding method to Chrome and support both like Opera does now. Or even more feasible someone decided they would alias IE's binding method in Chrome. Chrome would start getting IE's code paths but since it only supported that specific method it would be dead in the water when given other codes IE should be able to run.
|
|