From 0a4bb4379de9be8ac3c17da66b47d6b05532d1fc Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Tue, 19 Jul 2016 11:27:34 -0700 Subject: [PATCH] fix to hide the formatting menu in ios --- lib/components/content.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/components/content.js b/lib/components/content.js index 353a0ab12..ebf2219f4 100644 --- a/lib/components/content.js +++ b/lib/components/content.js @@ -401,9 +401,15 @@ class Content extends React.Component { const style = { ...this.props.style, - outline: 'none', // prevent the default outline styles - whiteSpace: 'pre-wrap', // preserve adjacent whitespace and new lines - wordWrap: 'break-word' // allow words to break if they are too long + // COMPAT: Prevent iOS from showing the BIU formatting menu, which causes + // the internal state to get out of sync in weird ways. + WebkitUserModify: 'read-write-plaintext-only', + // Prevent the default outline styles. + outline: 'none', + // Preserve adjacent whitespace and new lines. + whiteSpace: 'pre-wrap', + // Allow words to break if they are too long. + wordWrap: 'break-word' } return (