Skip to content

Fix split-pane pageXof/pageYof crash on 0-coordinate / native event (BL-16584) - #8084

Draft
hatton wants to merge 2 commits into
masterfrom
BL-16584-sentry-splitpane-pagexy
Draft

Fix split-pane pageXof/pageYof crash on 0-coordinate / native event (BL-16584)#8084
hatton wants to merge 2 commits into
masterfrom
BL-16584-sentry-splitpane-pagexy

Conversation

@hatton

@hatton hatton commented Jul 20, 2026

Copy link
Copy Markdown
Member

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/pageYof used event.pageX || event.originalEvent.pageX.
That treats a legitimate 0 coordinate (dragging to the very edge of the page) as missing,
falls through to event.originalEvent, and originalEvent is undefined for a native
(non-jQuery) event — so it crashes dereferencing .pageX/.pageY on undefined.

Fix: check the coordinate for null/undefined instead of falsiness (so 0 is honored),
guard event.originalEvent before dereferencing, and return 0 as a last resort instead of
throwing.

pageXof/pageYof are module-private inner functions in this legacy jQuery-based split-pane
library 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 preflight skill.

Ref: BL-16584

Devin review


This change is Reviewable

hatton and others added 2 commits July 20, 2026 13:36
…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>
@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a production crash (Sentry BLOOM-DESKTOP-FJ0/FPW/DTS) in the split-pane drag handler. The root cause was event.pageX || event.originalEvent.pageX treating a legitimate coordinate of 0 as falsy and then dereferencing originalEvent, which is undefined for native (non-jQuery) events.

  • pageXof and pageYof now use != null to accept 0 as a valid coordinate and guard event.originalEvent before dereferencing it, returning 0 as a safe fallback.
  • The change is narrow and self-contained — two four-line functions in a legacy library with a clear, well-commented rationale.

Important Files Changed

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

@hatton

hatton commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

[Claude Sonnet 5] Consulted Devin on 2026-07-20 19:45 UTC up to commit e61bc0e — clean, no Bugs or Investigate flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant