Opened 15 years ago
Closed 15 years ago
#122 closed defect (fixed)
[patch] bugfix for Opera
Reported by: | Owned by: | anonymous | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Core | Version: | 0.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Today's changes broke Opera 8.50 completely. Opera defines some objects similar to IE or FF, but not all properties and methods are implemented.
Example:
if (document.selection) document.selection.clear();
This code breaks Opera because document.selection doesn't have clear() method. Opera's document.selection is a string. Its only method is createRange(). The correct code should check for methods before calling them:
if (document.selection && document.selection.clear) document.selection.clear();
The same goes for new SVG sniffing, which expects enabledPlugin to be defined.
Attachments (1)
Change History (5)
Changed 15 years ago by
Attachment: | dojo.opera.1.patch added |
---|
comment:1 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 15 years ago by
The document.selection code is in a try-catch block so that should actually be fine without modification. I've applied your changes to hostenv_browser.js though.
Thanks very much for taking the time out to create these patches, it's very much appreciated!
comment:3 Changed 15 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I tested it and ... it doesn't work. try/catch is funny in Opera. You should apply the patch to html.js.
comment:4 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
patch for html.js and hostenv_browser.js