Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5575 closed defect (fixed)

Dojo should check for WebKit rather than Safari

Reported by: guest Owned by: alex
Priority: high Milestone: 1.1
Component: General Version: 1.0
Keywords: Cc: mrowe@…, mdknapp@…
Blocked By: Blocking:

Description

WebKit is used in many contexts outside of Safari, from other web browsers (OmniWeb, Shiira, Epihany, etc) to non-browser applications (Dashboard, NetNewsWire, etc). Dojo frequently checks for the presence of the string "safari" in the user agent string. This will fail in applications using WebKit that are not Safari. The check should be for WebKit for maximum compatibility.

On a related note, Dojo also does version checking on the major part of Safari's marketing version. This is a bad idea for the reasons mentioned above, and because the major part of the marketing version is an incredibly coarse version check. The correct version number to be testing, if required, is the WebKit build number.

  • Mark Rowe (mrowe@…)

Change History (8)

comment:1 Changed 11 years ago by alex

Milestone: 1.1
Owner: changed from anonymous to alex
Status: newassigned

comment:2 Changed 11 years ago by Adam Peller

the corollary is that we should be checking for Gecko, or at least Mozilla, instead of Firefox.

comment:3 Changed 11 years ago by alex

Cc: mdknapp@… added

comment:4 Changed 11 years ago by alex

Resolution: fixed
Status: assignedclosed

(In [12330]) update Dojo's Safari detection to use WebKit? tech versions if explicit Safari versions aren't available. Fixes #5575. !strict

comment:5 Changed 11 years ago by Adam Peller

Resolution: fixed
Status: closedreopened

patch doesn't check for indexOf == -1, so FF might act like Safari? I'm told this rev breaks the Editor on FF2

comment:6 in reply to:  5 Changed 11 years ago by guest

Replying to peller:

patch doesn't check for indexOf == -1, so FF might act like Safari? I'm told this rev breaks the Editor on FF2

This rev breaks also SHIFT_TAB, arrow keys, F1..F12, etc on FF2

Nicola

comment:7 Changed 11 years ago by alex

Resolution: fixed
Status: reopenedclosed

(In [12374]) more accurate detection of WebKit?, Safari, etc. Un-breaks the editor. Fixes #5575. !strict

comment:8 Changed 11 years ago by alex

should be fixed, although I doubt we'll every rely on webkit version number solely. We care about broad feature compatibility, and the Safari marketing number is a good indication of that. Adding to the size of dojo.js for a map of version number checks isn't something I'm looking to doing at this point. The incremental value for those extra bytes isn't high enough.

Note: See TracTickets for help on using tickets.