File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -553,7 +553,7 @@ class EditContextManager {
553553 selectionEnd : this . toContextPos ( view . state . selection . main . head )
554554 } )
555555 this . handlers . textupdate = e => {
556- let { anchor} = view . state . selection . main
556+ let { anchor, head } = view . state . selection . main
557557 let from = this . toEditorPos ( e . updateRangeStart ) , to = this . toEditorPos ( e . updateRangeEnd )
558558 if ( view . inputState . composing >= 0 && ! this . composing )
559559 this . composing = { contextBase : e . updateRangeStart , editorBase : from , drifted : false }
@@ -565,6 +565,9 @@ class EditContextManager {
565565
566566 // Edit contexts sometimes fire empty changes
567567 if ( change . from == change . to && ! change . insert . length ) return
568+ if ( ( browser . mac || browser . android ) && change . from == head - 1 &&
569+ / ^ \. ? $ / . test ( e . text ) && view . contentDOM . getAttribute ( "autocorrect" ) == "off" )
570+ change = { from, to, insert : Text . of ( [ e . text . replace ( "." , " " ) ] ) }
568571
569572 this . pendingContextChange = change
570573 if ( ! view . state . readOnly ) {
You can’t perform that action at this time.
0 commit comments