Skip to content

Commit 4f4b54c

Browse files
committed
Request render after inserting replacement text
The insertReplacementText text comes from an autocorrected word. If we don't request a render, the cursor will be in the wrong place and the document doesn't update until the user types another character. Fixes #1119
1 parent cadc7bb commit 4f4b54c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/trix/controllers/level_2_input_controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ export default class Level2InputController extends InputController {
443443
},
444444

445445
insertReplacementText() {
446-
return this.insertString(this.event.dataTransfer.getData("text/plain"), { updatePosition: false })
446+
this.insertString(this.event.dataTransfer.getData("text/plain"), { updatePosition: false })
447+
this.requestRender()
447448
},
448449

449450
insertText() {

0 commit comments

Comments
 (0)