We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
调整页面比例后聊天框会逐渐变小,官网组件页即可复现
不触发此类效果
官网组件页即可复现
已经在个人fork的仓库中进行修复 https://github.com/sinianluoye/pro-chat/pull/2/files
bug触发的原因是src/ProChat/container/App.tsx下 RcResizeObserver组件的onResize函数调用setHeight后height和e.height始终存在一个很小的差值,导致一直触发onResize事件
onResize={(e) => { if (e.height !== height) { setHeight(e.height); } }
修改后的代码为
onResize={(e) => { if ((typeof height !== typeof e.height) || (typeof height === 'string' && typeof e.height === 'string' && e.height !== height) || (typeof height === 'number' && Math.abs(e.height - height) > 1)) { // 加一个 Math.abs(e.height - height) > 1 的判断以避免height和e.height相差过小导致的页面一直缩小 setHeight(e.height); } }}
The text was updated successfully, but these errors were encountered:
神奇的 bug 哈哈哈
Sorry, something went wrong.
@sinianluoye 直接给我们提一个 pr 合并进来呢 哈哈哈
Successfully merging a pull request may close this issue.
🐛 bug 描述
调整页面比例后聊天框会逐渐变小,官网组件页即可复现
📷 复现步骤
调整页面比例后聊天框会逐渐变小,官网组件页即可复现
1.mp4
🏞 期望结果
不触发此类效果
💻 复现代码
官网组件页即可复现
© 版本信息
🚑 其他信息
已经在个人fork的仓库中进行修复 https://github.com/sinianluoye/pro-chat/pull/2/files
bug触发的原因是src/ProChat/container/App.tsx下 RcResizeObserver组件的onResize函数调用setHeight后height和e.height始终存在一个很小的差值,导致一直触发onResize事件
修改后的代码为
The text was updated successfully, but these errors were encountered: