OCPBUGS-74156: Prevent pod log viewer from shifting page layout when searching#16193
Conversation
Workaround for upstream PF LogViewer bug where scrollIntoView propagates to ancestor scroll containers when wrap lines is disabled Assisted by Claude code
|
@sg00dwin: This pull request references Jira Issue OCPBUGS-74156, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@sg00dwin: This pull request references Jira Issue OCPBUGS-74156, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThis change introduces a targeted CSS override in ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhamilto, sg00dwin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick release-4.21 |
|
@sg00dwin: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@sg00dwin: Jira Issue Verification Checks: Jira Issue OCPBUGS-74156 Jira Issue OCPBUGS-74156 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@sg00dwin: #16193 failed to apply on top of branch "release-4.21": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Fix included in accepted release 4.22.0-0.nightly-2026-04-04-113332 |


Description:
When viewing pod logs with "Wrap lines" disabled, searching for a string causes the entire page content to shift left, and to be partially hidden behind the sidebar navigation.
Root Cause
This is an upstream PatternFly bug (react-log-viewer#106). PF LogViewer calls
scrollIntoView({ inline: 'center' })on search matches, which per the CSSOM View spec scrolls all scrollable ancestors — not just the log viewer's own container. PF Drawer setsoverflow: hiddenon.pf-v6-c-drawer__main, which still acts as a scroll container for programmatic scrolling, causing the entire page to shift.Fix
Override
overflow: hiddentooverflow: clipon.pf-v6-c-drawer__main, scoped within the parent#contentdiv. Theclipvalue has identical visual clipping but removes the element from being a scroll container entirely, soscrollIntoViewskips it. This prevents the page shift without affecting the log viewer's own horizontal scrolling.Verification
Assisted by Claude code
Before

After

Summary by CodeRabbit