Opened 14 years ago

Closed 14 years ago

#122 closed defect (fixed)

[patch] bugfix for Opera

Reported by: eugene@… 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)

dojo.opera.1.patch (1.5 KB) - added by eugene@… 14 years ago.
patch for html.js and hostenv_browser.js

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by eugene@…

Attachment: dojo.opera.1.patch added

patch for html.js and hostenv_browser.js

comment:1 Changed 14 years ago by psowden

Resolution: fixed
Status: newclosed

(In [1608]) applying Opera fix patch, fixes #122

comment:2 Changed 14 years ago by psowden

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 14 years ago by eugene@…

Resolution: fixed
Status: closedreopened

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 14 years ago by psowden

Resolution: fixed
Status: reopenedclosed

(In [1609]) applying (modified) patch to fix drag and drop in Opera. fixes #122 and fixes #123

Note: See TracTickets for help on using tickets.