1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-18 13:11:17 +02:00

fix to hide the formatting menu in ios

This commit is contained in:
Ian Storm Taylor
2016-07-19 11:27:34 -07:00
parent ed6000b210
commit 0a4bb4379d

View File

@@ -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 (