Skip to content

Commit

Permalink
Better key support for plainview, chrome, and older versions of Safari.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Boucher committed Sep 11, 2008
1 parent 43cc45b commit 398b284
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions AppKit/CPCompatibility.j
Expand Up @@ -88,15 +88,12 @@ else if (USER_AGENT.indexOf("AppleWebKit/") != -1)
PLATFORM_FEATURES |= CPJavascriptClipboardAccessFeature;
PLATFORM_FEATURES |= CPJavaScriptShadowFeature;

if(USER_AGENT.indexOf("AppleWebKit/") != -1)
{
var versionStart = USER_AGENT.indexOf("AppleWebKit/") + "AppleWebKit/".length,
versionEnd = USER_AGENT.indexOf(" ", versionStart),
version = parseFloat(USER_AGENT.substring(versionStart, versionEnd), 10);

if(version >= 525.13)
PLATFORM_FEATURES |= CPJavascriptRemedialKeySupport;
}
var versionStart = USER_AGENT.indexOf("AppleWebKit/") + "AppleWebKit/".length,
versionEnd = USER_AGENT.indexOf(" ", versionStart),
version = parseFloat(USER_AGENT.substring(versionStart, versionEnd), 10);

if(USER_AGENT.indexOf("Plainview") == -1 && version >= 525.14 || USER_AGENT.indexOf("Chrome") != -1)
PLATFORM_FEATURES |= CPJavascriptRemedialKeySupport;
}

// KHTML
Expand Down

0 comments on commit 398b284

Please sign in to comment.