Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Limiting this to only Chrome.
Browse files Browse the repository at this point in the history
  • Loading branch information
brookslyrette committed Mar 30, 2016
1 parent 6761bce commit 7c081fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/component/handlers/edit/editOnKeyDown.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var EditorState = require('EditorState');
var KeyBindingUtil = require('KeyBindingUtil');
var Keys = require('Keys');
var SecondaryClipboard = require('SecondaryClipboard');
var UserAgent = require('UserAgent');

var keyCommandBackspaceToStartOfLine = require('keyCommandBackspaceToStartOfLine');
var keyCommandBackspaceWord = require('keyCommandBackspaceWord');
Expand All @@ -32,6 +33,7 @@ var keyCommandUndo = require('keyCommandUndo');
import type {DraftEditorCommand} from 'DraftEditorCommand';

var { isOptionKeyCommand } = KeyBindingUtil;
var isChrome = UserAgent.isBrowser('Chrome');

/**
* Map a `DraftEditorCommand` command value to a corresponding function.
Expand Down Expand Up @@ -107,7 +109,7 @@ function editOnKeyDown(e: SyntheticKeyboardEvent): void {
return;
case Keys.SPACE:
// handling for OSX where option + space scrolls
if (isOptionKeyCommand(e)) {
if (isChrome && isOptionKeyCommand(e)) {
e.preventDefault();
// insert a space into the editor
const contentState = DraftModifier.replaceText(
Expand Down

0 comments on commit 7c081fe

Please sign in to comment.