diff --git a/packages/block-library/src/shortcode/edit.native.js b/packages/block-library/src/shortcode/edit.native.js index ee39391f9b747..67aa699836dbe 100644 --- a/packages/block-library/src/shortcode/edit.native.js +++ b/packages/block-library/src/shortcode/edit.native.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { View, Text } from 'react-native'; +import { Platform, View, Text } from 'react-native'; /** * WordPress dependencies @@ -36,6 +36,14 @@ export function ShortcodeEdit( props ) { isSelected={ props.isSelected } onFocus={ onFocus } onBlur={ onBlur } + autoCorrect={ false } + autoComplete="off" + /* + * For some devices autoCorrect and autoComplete are not enough to hide the suggestion toolbar. + * Following the suggestion below we added the keyboard type as well. + * https://stackoverflow.com/questions/37001070/how-to-avoid-the-suggestions-of-keyboard-for-android-in-react-native/51411575#51411575 + */ + keyboardType={ Platform.OS === 'ios' ? 'default' : 'visible-password' } placeholderTextColor={ placeholderStyle.color } />