3.1 alpha 45842c0ea9c6e80f56954efb5e08a7c81e372fc4
Sample Project: 3.1 Keyframe Inspector Issue.zip
To reproduce this you have to click around a bit randomly on the area of a visual keyframe. Sometimes the inspector properties will become hidden, even though the keyframe is selected. Other time it will appear to flicker from showing to hiding it.
So far I've noticed this on sprite frames, it might also be an issue on other keyframes that have graphical keyframes.

I could reproduce this so far: selection of keyframes requires pixel-perfect clicking. If the mouse cursor is moved after the mouse down event by one or more pixels, the editor expects that the keyframe should be moved. This is handled in AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) depending on moving_selection_attempt and moving_selection_attempt. One solution could be to start movement only after a fixed threshold of n pixels to allow non-perfect clicking to a certain degree?
It seems that moving keyframes always closes the inspector, however, I did not find how/where this is triggered in the source file...
Thanks for investigating it. Good eye on the moving issuing. I just noticed the other problem you mentioned. For me it happens on the mouse release after dragging it.
I think that there is a bug related to these lines in AnimationTrackEditor::_move_selection_commit().
There is some processing done for moving the keyframes, then they are deselected/selection is cleared and then it is restored in step 7. Seems as if the inspector closes due to the undo_redo part with _clear_selection_for_anim. However, some piece seems to be missing which updates the inspector afterwards (if you comment the first two lines, inspector stays open and selection is visible afterwards, but with wrong time data => should be updated afterwards...)
undo_redo->add_do_method(this, "_clear_selection_for_anim", animation);
undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation);
// 7-reselect
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
float oldpos = E->get().pos;
float newpos = oldpos + motion;
//if (newpos>=0)
undo_redo->add_do_method(this, "_select_at_anim", animation, E->key().track, newpos);
undo_redo->add_undo_method(this, "_select_at_anim", animation, E->key().track, oldpos);
}
undo_redo->commit_action();
Most helpful comment
I could reproduce this so far: selection of keyframes requires pixel-perfect clicking. If the mouse cursor is moved after the mouse down event by one or more pixels, the editor expects that the keyframe should be moved. This is handled in
AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event)depending onmoving_selection_attemptandmoving_selection_attempt. One solution could be to start movement only after a fixed threshold ofnpixels to allow non-perfect clicking to a certain degree?It seems that moving keyframes always closes the inspector, however, I did not find how/where this is triggered in the source file...