Skip to content

Keep weight/bias hovercard open while editing - #256

Open
JanickSpielmann wants to merge 1 commit into
tensorflow:masterfrom
JanickSpielmann:fix/pin-weight-hovercard
Open

JanickSpielmann wants to merge 1 commit into
tensorflow:masterfrom
JanickSpielmann:fix/pin-weight-hovercard

Conversation

@JanickSpielmann

Copy link
Copy Markdown

Problem

The weight/bias hovercard is tied to the mouse position. The input field only lives inside the card, and the card is hidden by mouseleave on the thin invisible link path. So while typing a new weight, a small mouse movement off the line closes the card and the edit is lost.

Change

Clicking into the card now pins it. While pinned, updateHoverCard ignores mouseleave and mouseenter from links and neurons, so the card stays open when the pointer drifts away. The card closes on Enter, Escape, or a mouse press outside of it. Plain hovering without a click behaves exactly as before.

The invisible hover path of links is also widened from 8 px to 14 px so links are easier to hit.

Testing

Built with npm run build and tested in Chromium with Playwright: hover opens the card, click shows the input, moving the pointer 120 px away keeps the card open, typing works, Enter/Escape/outside click close it, and hover without click still hides the card on leave. No console errors. I did not verify on touch devices.

Generated with Claude Code (https://claude.com/claude-code)

https://claude.ai/code/session_01K4U4bLzdEj7UET5p21Ltu3

Previously the hovercard was tied to the mouse position: as soon as the
pointer left the thin invisible link path, mouseleave closed the card and
the input field with it, even in the middle of typing a value.

Now clicking into the card pins it. It stays open when the pointer leaves
the link or enters another one, and closes on Enter, Escape or a mouse
press outside of the card. Plain hovering without a click behaves as
before. The invisible hover path is also widened from 8 to 14 px to make
the link easier to hit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K4U4bLzdEj7UET5p21Ltu3
@google-cla

google-cla Bot commented Oct 28, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@JanickSpielmann

Copy link
Copy Markdown
Author

ok did that

This branch has not been deployed

No deployments
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