Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable the editor to save viewState #696

Merged
merged 2 commits into from
Mar 8, 2022
Merged

Conversation

kiwiwong
Copy link
Collaborator

@kiwiwong kiwiwong commented Mar 7, 2022

简介

修复切换editor tab时,光标不会自动回到上次编辑位置的问题。

变更

  • 在编辑器失去焦点时,保存当前的viewState
  • EditorController的initEditorEvents方法由private改为public,并增加了getViewState方法

@kiwiwong kiwiwong added the bug Something isn't working label Mar 7, 2022
@kiwiwong kiwiwong requested review from wewoor and mortalYoung March 7, 2022 08:32
@kiwiwong kiwiwong self-assigned this Mar 7, 2022
@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #696 (be74604) into main (ee1edf3) will increase coverage by 0.44%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #696      +/-   ##
==========================================
+ Coverage   90.88%   91.33%   +0.44%     
==========================================
  Files         189      189              
  Lines        5934     5942       +8     
  Branches     1425     1426       +1     
==========================================
+ Hits         5393     5427      +34     
+ Misses        534      508      -26     
  Partials        7        7              
Impacted Files Coverage Δ
src/controller/editor.tsx 47.29% <100.00%> (+21.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee1edf3...be74604. Read the comment docs.

Copy link
Collaborator

@wewoor wewoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@wewoor wewoor merged commit 1d4f6da into main Mar 8, 2022
@wewoor wewoor deleted the fix/editorViewState branch March 8, 2022 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants