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(docz-theme-default): force codemirror to refresh (#637) #638

Merged
merged 1 commit into from
Feb 17, 2019
Merged

fix(docz-theme-default): force codemirror to refresh (#637) #638

merged 1 commit into from
Feb 17, 2019

Conversation

ivan-dalmet
Copy link
Contributor

@ivan-dalmet ivan-dalmet commented Feb 15, 2019

Bug explanation

The selection in Playground code (CodeMirror) is not what you see.
So in some case you can't select some code.
And if you copy/paste it's not what you expected.

To Reproduce

  1. Go to examples/basic
  2. Click on the second Playground code button
  3. Try to select all the code (with mouse not ctrl+a)
  4. You can't :/
    codemirror-bug

CodeMirror instance is not loaded correctly.
You can resize your window and it works (because CodeMirror refresh itself when window size change).

Solution

We force CodeMirror to refresh itself if its height have changed.

Screenshots

Before After
codemirror-bug codemirror-fixed

@pedronauck pedronauck changed the base branch from dev to v0.14 February 17, 2019 23:39
@pedronauck pedronauck changed the base branch from v0.14 to dev February 17, 2019 23:39
@pedronauck pedronauck merged commit 91b5f5b into doczjs:dev Feb 17, 2019
pedronauck added a commit that referenced this pull request Feb 22, 2019
* dev:
  fix(docz-theme-default): fix duplicates in search (#532) (#639)
  fix(docz-theme-default): force codemirror to refresh (#637) (#638)
  added support for link to custom repository. (#595)
  v0.13.6
  fix(docz-core): happypack plugin name
  fix(docz-core): default value for arguments
  chore: update dependencies
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.

3 participants