-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: 修复嵌入图片过大指引位置错误 #1802
Merged
Merged
fix: 修复嵌入图片过大指引位置错误 #1802
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此段代码主要涉及初始化聊天控件的设置和事件处理,其中对文档流(viewport)元素有一定的引用,需要进一步明确是针对哪些窗口尺寸进行适配。
对于代码中存在的一些问题:1) 在处理拖动事件时使用
clientY
和clientX
计算距离而不是实际的位置;2) 使用绝对定位布局后应考虑在计算样式高度宽度以及鼠标悬停效果时引入相对单位(px),如:not(#maxkb .maxkb-mask)
等条件用于获取或限制元素大小。这些调整有助于提升代码的可读性和实用性,避免了不必要的浏览器兼容性问题。