From fba004fa95b0a2e27ec24311e3829e233dfa4218 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Tue, 18 Jun 2019 12:21:22 -0700 Subject: [PATCH] fix cursor with 'readonly' Closes #791 --- components/Carbon.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/Carbon.js b/components/Carbon.js index 2ab22e0..1509e6a 100644 --- a/components/Carbon.js +++ b/components/Carbon.js @@ -121,8 +121,7 @@ class Carbon extends React.PureComponent { extraKeys: { 'Shift-Tab': 'indentLess' }, - // negative values removes the cursor, undefined means default (530) - cursorBlinkRate: this.props.readOnly ? -1 : undefined, + readOnly: this.props.readOnly ? 'nocursor' : false, // needs to be able to refresh every 16ms to hit 60 frames / second pollInterval: 16 }