Skip to content

fix: hide Kepler editor tooltip “top-left jump” on invalid hover coords - #3294

Merged
igorDykhta merged 2 commits into
keplergl:masterfrom
bdjulbic:fix/kepler-editor-tooltip-invalid-coords-pr
Jan 30, 2026
Merged

fix: hide Kepler editor tooltip “top-left jump” on invalid hover coords#3294
igorDykhta merged 2 commits into
keplergl:masterfrom
bdjulbic:fix/kepler-editor-tooltip-invalid-coords-pr

Conversation

@bdjulbic

@bdjulbic bdjulbic commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Prevents the Kepler/Deck editor tooltip from snapping to the top-left corner when DeckGL reports invalid hover coordinates (e.g. -1/-1).

What changed

Adds a small guard in packages/kepler.gl/src/components/src/map-container.tsx inside the DeckGL getTooltip callback to return null when info.x/info.y are clearly invalid.

Tooltip issue example

This is most noticeable when the pointer moves over custom UI elements layered above the map (e.g. toolbars/controls/overlays) or when the cursor is effectively outside the map canvas/container. Deck can still emit hover updates, but the reported coordinates are invalid for map positioning.

tool tip issue

Tooltip logs when hovering over a non-kepler component

logs-resized

Copilot AI review requested due to automatic review settings January 30, 2026 14:44
Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
@bdjulbic
bdjulbic force-pushed the fix/kepler-editor-tooltip-invalid-coords-pr branch from 1f76cff to f447f84 Compare January 30, 2026 14:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents the Kepler/Deck editor tooltip from snapping to the top-left corner when DeckGL reports invalid hover coordinates (e.g. -1/-1).

Changes:

  • Added a guard in the DeckGL getTooltip callback to return null when info.x/info.y are invalid.
  • Wrapped the existing tooltip creation call (EditorLayerUtils.getTooltip) behind the new validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/src/map-container.tsx Outdated
Comment thread src/components/src/map-container.tsx
Comment thread src/components/src/map-container.tsx Outdated
Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
@igorDykhta
igorDykhta merged commit cf76bba into keplergl:master Jan 30, 2026
7 checks passed
bdjulbic added a commit to bdjulbic/kepler.gl that referenced this pull request Feb 6, 2026
…ds (keplergl#3294)

* fix tooltip coordinate

Signed-off-by: bdjulbic <bdjulbic@foursquare.com>

* reformat and add test

Signed-off-by: bdjulbic <bdjulbic@foursquare.com>

---------

Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
@bdjulbic
bdjulbic deleted the fix/kepler-editor-tooltip-invalid-coords-pr branch March 17, 2026 08:06
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.

3 participants