diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index af3bc0c06b5..6c81962d24c 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -4,6 +4,7 @@ ### Fixes +- Fix `n-button` causes crash when it's imported in script inside head tag. [#68](https://github.com/TuSimple/naive-ui/pull/68) - Fix `n-spin` animation shifts. ## 2.11.5 (2021-06-10) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index db6787a51e4..b52d4bf20df 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -4,6 +4,7 @@ ### Fixes +- 修正 `n-button` 在 head 内部的 script 被引入造成崩溃 [#68](https://github.com/TuSimple/naive-ui/pull/68) - 修正 `n-spin` 动画闪烁 ## 2.11.5 (2021-06-10) diff --git a/src/button/src/styles/button.cssr.ts b/src/button/src/styles/button.cssr.ts index 93ea0bfdfe6..f76245303da 100644 --- a/src/button/src/styles/button.cssr.ts +++ b/src/button/src/styles/button.cssr.ts @@ -154,7 +154,7 @@ export default c([ animationName: 'button-wave-spread, button-wave-opacity' }) ]), - (typeof window !== 'undefined' && 'MozBoxSizing' in document.body.style) + (typeof window !== 'undefined' && 'MozBoxSizing' in document.createElement('div').style) ? c('&::moz-focus-inner', { border: 0 })