mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-20 15:26:06 +08:00
Fix Slate bug causing the composer to blur if you undo past the end of undo history
This commit is contained in:
parent
2703f99cdd
commit
34eccfa7df
2
app/package-lock.json
generated
2
app/package-lock.json
generated
|
@ -2762,7 +2762,7 @@
|
|||
}
|
||||
},
|
||||
"slate": {
|
||||
"version": "github:bengotow/slate#398558065024005d2529f221c54144807a8ab4cf",
|
||||
"version": "github:bengotow/slate#cd6f40e8db9058f518c091cffe364608b3c858e6",
|
||||
"requires": {
|
||||
"debug": "3.2.6",
|
||||
"direction": "0.1.5",
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
"rtlcss": "2.4.0",
|
||||
"runas": "getflywheel/node-runas#ca4f0714",
|
||||
"rx-lite": "4.0.8",
|
||||
"slate": "github:bengotow/slate#0.45.1",
|
||||
"slate": "github:bengotow/slate#cd6f40e8",
|
||||
"slate-auto-replace": "0.12.1",
|
||||
"slate-base64-serializer": "0.2.100",
|
||||
"slate-html-serializer": "0.7.39",
|
||||
|
|
|
@ -83,7 +83,8 @@ function hotwireDraftBodyState(draft: any, session: DraftEditingSession): Messag
|
|||
.replaceNodeByKey(first.key, Block.create({ type: 'div' }))
|
||||
.moveToRangeOfDocument()
|
||||
.insertFragment(inHTMLEditorValue.document)
|
||||
.moveToStart().value;
|
||||
.moveToStart()
|
||||
.focus().value;
|
||||
} catch (err) {
|
||||
// deleting and re-inserting the whole document seems to push Slate pretty hard and it
|
||||
// sometimes fails with odd schema issues (undefined node, invalid range.) Just fall
|
||||
|
|
Loading…
Reference in a new issue