fossasia / visdom

A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Torch and Numpy.
Apache License 2.0
9.99k stars 1.14k forks source link

Fix disabled text and number property inputs by removing keypress preventDefault() calls interfering from unrelated panes. #936

Open tripp528 opened 4 months ago

tripp528 commented 4 months ago

Description

Commented out some preventDefault calls on keypress events that were being called from panes that weren't the target for the event.

Motivation and Context

Text and number property inputs were not functioning when a separate embeddings, text, or image pane was present and had a keypress callback handler registered to it.

Fixes #935

tripp528 commented 4 months ago

I'm not sure what those preventDefault() calls were meant for exactly, but this doesn't seem to have introduced any issues thus far. A cleaner fix might be to check if e.g. the ImagePane was the target before calling preventDefault.