Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: ajaxorg/ace
...
head fork: ajaxorg/ace
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Jun 27, 2012
Mike Taylor Add "KeyboardEvent" in window check for old Opera.
We've added support for DOM3 Keyboard Events (and cleaned up things)
generally--so this workaround won't be needed when those changes
land in a stable version of Opera. This change allows older versions
of Opera to continue working.
d7ad494
Commits on Jun 28, 2012
Mike Taylor Oops, forgot some grouping parens. d388fe9
Commits on Jun 30, 2012
@nightwing nightwing Merge pull request #824 from miketaylr/opera_keyboardevent
Add "KeyboardEvent" in window check for old Opera.
c66d16c
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/ace/lib/event.js
View
4 lib/ace/lib/event.js
@@ -227,7 +227,7 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac
function normalizeCommandKeys(callback, e, keyCode) {
var hashId = 0;
- if (useragent.isOpera && useragent.isMac) {
+ if ((useragent.isOpera && !("KeyboardEvent" in window)) && useragent.isMac) {
hashId = 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0)
| (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
} else {
@@ -268,7 +268,7 @@ function normalizeCommandKeys(callback, e, keyCode) {
exports.addCommandKeyListener = function(el, callback) {
var addListener = exports.addListener;
- if (useragent.isOldGecko || useragent.isOpera) {
+ if (useragent.isOldGecko || (useragent.isOpera && !("KeyboardEvent" in window))) {
// Old versions of Gecko aka. Firefox < 4.0 didn't repeat the keydown
// event if the user pressed the key for a longer time. Instead, the
// keydown event was fired once and later on only the keypress event.

No commit comments for this range

Something went wrong with that request. Please try again.