fix: prevent spurious scroll-triggered approval drawer re-opens; remove unreliable scroll-compensation#530
Draft
fix: prevent spurious scroll-triggered approval drawer re-opens; remove unreliable scroll-compensation#530
Conversation
- Fix isDrawerOpen selector to match actual DOM structure - Add hasTriggered flag with MutationObserver reset to prevent repeated triggers - Add scroll direction check: only trigger when scrolling down - Fix isAtBottom to require scrollHeight > clientHeight (avoids short-page false triggers) - Remove auto scrollToBottom animation in approve.js drawer open handler Co-authored-by: yinlianghui <6219465+yinlianghui@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix approval drawer auto-popup during scrolling
fix: prevent spurious scroll-triggered approval drawer popup
Feb 27, 2026
Copilot
AI
changed the title
fix: prevent spurious scroll-triggered approval drawer popup
fix: 修复审批单滚动到底部误触发审批栏弹出问题
Feb 27, 2026
… prevent content blockage Co-authored-by: yinlianghui <6219465+yinlianghui@users.noreply.github.com>
Copilot
AI
changed the title
fix: 修复审批单滚动到底部误触发审批栏弹出问题
fix: scroll body to new bottom after scroll-triggered approval drawer opens
Feb 27, 2026
…of new approach Co-authored-by: yinlianghui <6219465+yinlianghui@users.noreply.github.com>
Copilot
AI
changed the title
fix: scroll body to new bottom after scroll-triggered approval drawer opens
revert: remove smooth-scroll-to-bottom workaround for approval drawer UX
Feb 27, 2026
…smooth-scroll patch Co-authored-by: yinlianghui <6219465+yinlianghui@users.noreply.github.com>
Copilot
AI
changed the title
revert: remove smooth-scroll-to-bottom workaround for approval drawer UX
fix: clean up scroll-to-bottom approval drawer auto-open
Feb 27, 2026
Copilot
AI
changed the title
fix: clean up scroll-to-bottom approval drawer auto-open
fix: prevent spurious scroll-triggered approval drawer re-opens; remove unreliable scroll-compensation
Feb 27, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two bugs in the scroll-to-bottom auto-open approval drawer logic, plus removal of a timing-dependent UX compensation that couldn't reliably solve drawer content overlap.
Changes
flow.js— fix scroll trigger logicisAtBottom(): wasscrollHeight <= clientHeight || ...— short pages (content fits in viewport) incorrectly returnedtruealways. Fixed to require content actually overflows (scrollHeight > clientHeight) before treating scroll position as "at bottom"lastAtBottomedge-detection withhasTriggeredflag +MutationObserverthat resets the flag when drawer closes — prevents repeated triggers while scrolling at bottomisDrawerOpen(): tightened selector from.amis-dialog-widget.approval-drawer+offsetParentcheck to.steedos-amis-instance-approval-drawer-container .approval-drawerexistence checkapprove.js— removescrollToBottomcompensationThe
triggerSource = 'scrollToBottom'→scrollToBottom()path (jQuery animate scroll after drawer opens) was unreliable due to timing sensitivity. Both thescrollToBottomfunction and thetriggerSourcedataset tracking are removed. The layout-level drawer overlap issue is deferred to a separate PR.Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.