[19.0] document_url: opening the attachment box scrolls the chatter to the bottom
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 94/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
- 领域
- frontend
调研方向
阅读 static/src/js/url.esm.js,并结合 issue 中描述的 order="desc" 线程滚动行为,追踪 Chatter.onClickAddAttachments 的覆盖实现。将附件框的滚动值改为与 core mail 的 "bottom" 设置一致,然后验证打开附件框后,在线程重新计算滚动位置时 chatter 仍保持在顶部。
由索引模型根据 Issue 内容生成。
描述
Module: document_url 19.0.1.0.0
Steps to reproduce
- Open any record with a chatter that has several messages and at least one attachment.
- Click the paperclip in the chatter topbar.
- As soon as the thread recomputes its scroll (an image finishes loading, a resize), the chatter jumps to the very bottom, which is the oldest message.
Cause
static/src/js/url.esm.js overrides Chatter.onClickAddAttachments and sets
this.state.thread.scrollTop = 0. The chatter renders the thread with order="desc",
and there Thread.applyScroll reads a numeric scrollTop as the distance from the end
(scrollHeight - scrollTop - clientHeight), so 0 means "bottom of the list".
Core mail sets this.state.thread.scrollTop = "bottom", which for desc means the top.
Fix
if (this.state.isAttachmentBoxOpened) {
this.rootRef.el.scrollTop = 0;
- this.state.thread.scrollTop = 0;
+ this.state.thread.scrollTop = "bottom";
}
- 主要语言
- HTML
- 星标
- 256
- 派生
- 405
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OCA/knowledge 的其他 Issue
-
help wanted no stale work in progress
难度 4/5 3-5 天 新手友好度 30/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 43/100
OCA/knowledge#616 · 8 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 24/100
维护者通常 1 天内回复
-
Migration to version 19.0可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭help wanted no stale work in progress
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
-
Migration to version 18.0可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭help wanted no stale work in progress
难度 4/5 3-5 天 新手友好度 25/100
维护者通常 1 天内回复
相似的 Issue
-
good first issue
难度 2/5 1-3 小时 新手友好度 78/100
dataforgoodfr/mediterranean-rescue#91 ·
维护者通常 1 天内回复
-
enhancement possible-duplicate
难度 1/5 1-3 小时 新手友好度 78/100
AOSSIE-Org/PictoPy#1715 · 2 条评论 ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
OHDSI/Data2Evidence#3693 ·
维护者通常 3 天内回复
-
bug frontend priority: low
难度 2/5 1-3 小时 新手友好度 82/100
nooriegarg/ContribIQ#74 ·
维护者通常 1 天内回复