Bug #1826
closed
keyboard binding to enter key on quick search broken
Added by Chad Berkley almost 20 years ago.
Updated almost 20 years ago.
Description
When you are typing in the quick search field, if you hit the delete (or
backspace key) anything that is selected on the canvas is deleted. I think the
key binding is being incorrectly assigned to the whole application instead of
just to the quick search field and "go" button.
was this ever hooked up? I don't think it was for actors. Which one is broken?
When I use the actor quick search on windows XP, this doesn't appear to be a
problem.
Chad, could this be a Mac thing? Or is this still a problem for you?
I can't remember it ever working when hitting the return key. Not saying it
didn't, just implyig I think it has been broken a while.
I fixed this bug by changing the keyboard listener from looking at the window
focus. instead it now looks at the component focus. This was a simple change from
_jgraph.registerKeyboardAction(deletionListener, "BackSpace",
KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0),
JComponent.WHEN_IN_WINDOW_FOCUSED);
to
_jgraph.registerKeyboardAction(deletionListener, "BackSpace",
KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0),
JComponent.WHEN_FOCUSED);
Should I make this change in the Ptolemy Tree as well?
It seems fairly safe.
Original Bugzilla ID was 1826
Also available in: Atom
PDF