Fix selectable popover dismissing on key press (#14368)

Ephram created

Release Notes:

- Fixed dismissal bug included in #12918

Change summary

crates/editor/src/element.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Detailed changes

crates/editor/src/element.rs 🔗

@@ -408,8 +408,10 @@ impl EditorElement {
                 if phase != DispatchPhase::Bubble {
                     return;
                 }
-
                 editor.update(cx, |editor, cx| {
+                    if editor.hover_state.focused(cx) {
+                        return;
+                    }
                     Self::modifiers_changed(editor, event, &position_map, &text_hitbox, cx)
                 })
             }