From 0c7703e206eac666db0f68a970bd71617a988799 Mon Sep 17 00:00:00 2001 From: Andrei Railean Date: Fri, 9 Feb 2018 12:09:06 +1100 Subject: [PATCH] add ability to click multiple emojis in example (#1619) * add ability to click multiple emojis currently, after clicking one emoji, user needs to click in the editor before being able to add another emoji this fixes that by jumping to next text block and focusing selection to make it obvious where next insertion will take place. * lint code --- examples/emojis/index.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/emojis/index.js b/examples/emojis/index.js index 6308c3054..3a386698d 100644 --- a/examples/emojis/index.js +++ b/examples/emojis/index.js @@ -77,11 +77,14 @@ class Emojis extends React.Component { const { value } = this.state const change = value.change() - change.insertInline({ - type: 'emoji', - isVoid: true, - data: { code }, - }) + change + .insertInline({ + type: 'emoji', + isVoid: true, + data: { code }, + }) + .collapseToStartOfNextText() + .focus() this.onChange(change) }