Fix split-pane pageXof/pageYof crash on 0-coordinate / native event (BL-16584) - #8084
Draft
hatton wants to merge 2 commits into
Draft
Fix split-pane pageXof/pageYof crash on 0-coordinate / native event (BL-16584)#8084hatton wants to merge 2 commits into
hatton wants to merge 2 commits into
Conversation
…BL-16584) pageXof/pageYof used `event.pageX || event.originalEvent.pageX`, which treats a legitimate 0 coordinate (dragging a splitter to the page edge) as missing and falls through to `event.originalEvent`, which is undefined for native (non-jQuery) events - crashing the drag. Check for null/undefined instead of falsiness, guard originalEvent before dereferencing, and fall back to 0 rather than throwing. Fixes Sentry BLOOM-DESKTOP-FJ0, -FPW, -DTS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
| Filename | Overview |
|---|---|
| src/BloomBrowserUI/lib/split-pane/split-pane.ts | Replaces falsy ` |
Reviews (1): Last reviewed commit: "Merge origin/master into BL-16584-sentry..." | Re-trigger Greptile
Member
Author
|
[Claude Sonnet 5] Consulted Devin on 2026-07-20 19:45 UTC up to commit e61bc0e — clean, no Bugs or Investigate flags. |
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.
Summary
Sentry BLOOM-DESKTOP-FJ0 (pageY, ~3175 events / 17 users, live 6.3.1), -FPW (pageX, ~646/7,
6.3.2), and -DTS (pageY, ~77/9, 6.2.8) are one bug: dragging a pane splitter (origami page
layout) crashed because
pageXof/pageYofusedevent.pageX || event.originalEvent.pageX.That treats a legitimate
0coordinate (dragging to the very edge of the page) as missing,falls through to
event.originalEvent, andoriginalEventisundefinedfor a native(non-jQuery) event — so it crashes dereferencing
.pageX/.pageYonundefined.Fix: check the coordinate for
null/undefinedinstead of falsiness (so0is honored),guard
event.originalEventbefore dereferencing, and return0as a last resort instead ofthrowing.
pageXof/pageYofare module-private inner functions in this legacy jQuery-based split-panelibrary with no existing test file or test seam for this module — no unit test was added for
this fix.
Fixed by Claude Opus 4.8; this PR (commit, integration, bot gauntlet) run by Claude Sonnet 5
via the
preflightskill.Ref: BL-16584
Devin review
This change is