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

Import text render fix #838

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

shresthabijay
Copy link
Contributor

fixes #836

…or content editable

add test for importText action creator
@shresthabijay
Copy link
Contributor Author

@raineorshine The logic to prevent innerHTML updates while editing thought was causing this issue. I found a better way around to do this. I also added the test you provided. Please test the changes. Thanks!

@raineorshine
Copy link
Contributor

Beautiful, thanks!

The only problem I encountered was that the caret gets set to offset: 0 after pasting. The caret should go to the end of the pasted text. It was doing this before the innerHTML regression, but I'm not sure if there was special logic for it or if it was happening by default.

I am going to merge this PR since I am in need of this change, but can you create a separate PR to address the caret issue? Thanks so much!

@raineorshine raineorshine merged commit 27aa8a8 into cybersemics:dev Aug 20, 2020
@shresthabijay
Copy link
Contributor Author

Beautiful, thanks!

The only problem I encountered was that the caret gets set to offset: 0 after pasting. The caret should go to the end of the pasted text. It was doing this before the innerHTML regression, but I'm not sure if there was special logic for it or if it was happening by default.

I am going to merge this PR since I am in need of this change, but can you create a separate PR to address the caret issue? Thanks so much!

The caret offset always gets set to zero after innerHTML is updated. We can write a function to put the caret at the end after every innerHTML updates. I will create a separate PR for it.

@raineorshine
Copy link
Contributor

I will create a separate PR for it.

Great, thanks!

after every innerHTML updates

That sounds too broad. Right now I am only seeing the issue after importText.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Imported text not rendered
2 participants