jperasmus / docsify-copy-code

A docsify plugin that copies Markdown code block to your clipboard
MIT License
100 stars 73 forks source link

some effect on my Horizontal scroll bar #19

Closed masontin closed 4 years ago

masontin commented 4 years ago

Did your pages like this ?

window.$docsify = {
…
      copyCode: {
        buttonText: '复制',
        errorText: '复制失败',
        successText: '已复制'
      },
…
    }

1600678426290

jperasmus commented 4 years ago

Hmm, that is an interesting one. Do you perhaps have time to look into this and PR a fix? I currently have very limited time for this library.

masontin commented 4 years ago

This problem can be reproduced on firefox and chrome, but not on safari. The reason is that the error/success message is longer than the label.

I had created a PR #21 for this.

And this is my test gif, there is no scroll bar anymore.

Sep-21-2020 21-39-06

jperasmus commented 4 years ago

Thanks for the PR. Your fix should be available on NPM as v2.1.1

masontin commented 4 years ago

Thanks, I just saw version 2.2.1 on NPM.