From 08e748bcae4844181774dc9a0291ebe3745586d7 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Mon, 20 Jan 2020 12:50:32 -0300 Subject: [PATCH] MM-21634 Fix keyboard glitch when returning to channel screen from the code screen (#3813) --- .../markdown/markdown_code_block/markdown_code_block.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/components/markdown/markdown_code_block/markdown_code_block.js b/app/components/markdown/markdown_code_block/markdown_code_block.js index 692cf3a6c..46a1aa6c7 100644 --- a/app/components/markdown/markdown_code_block/markdown_code_block.js +++ b/app/components/markdown/markdown_code_block/markdown_code_block.js @@ -6,6 +6,7 @@ import React from 'react'; import {intlShape} from 'react-intl'; import { Clipboard, + Keyboard, StyleSheet, Text, View, @@ -66,7 +67,10 @@ export default class MarkdownCodeBlock extends React.PureComponent { }); } - goToScreen(screen, title, passProps); + Keyboard.dismiss(); + requestAnimationFrame(() => { + goToScreen(screen, title, passProps); + }); }); handleLongPress = async () => {