GNOME Bugzilla – Bug 353623
Popup window of entry completion for the location entry prevents keyboard shortcuts and tab switching
Last modified: 2018-12-28 08:00:53 UTC
Popup window of entry completion for the location entry prevents tab switching. If you press Ctrl+Pageup/Pagedown when the popup window of the entry completion is visible the keystrokes will not be received by the entry/epiphany, instead GtkEntryCompletion eats them which prevents the user from switching tabs. Firefox allows the user to switch tabs when the completion popup is visible, I can't see any obvious reasons why epiphany shouldn't allow it either.
Hmmm... I don't find this useful but I think it's consistent to _always_ have the tab shortcuts available.
The autocompletion popup eats Ctrl-PageUp/Down, I don't think we can do anything about that.
Xan, your opinion?
We could check if the Ctrl modifier is set in the GtkEntryCompletion handler and do not eat the key events, but other than that I don't see any solution.
Xan, if the key events aren't eaten, wouldn't that solve the problem?
Right now we are doing this: static gboolean entry_key_press_after_cb (GtkEntry *entry, GdkEventKey *event, EphyLocationEntry *lentry) { EphyLocationEntryPrivate *priv = lentry->priv; guint state = event->state & gtk_accelerator_get_default_mod_mask (); if ((event->keyval == GDK_Return || event->keyval == GDK_KP_Enter || event->keyval == GDK_ISO_Enter) && (state == GDK_CONTROL_MASK || state == (GDK_CONTROL_MASK | GDK_SHIFT_MASK))) { gtk_im_context_reset (entry->im_context); priv->needs_reset = TRUE; g_signal_emit_by_name (entry, "activate"); return TRUE; } return FALSE; } It should work since control+pageup/down returns false (so it propagates), so as far as I understand, problem is not here. Or is it?
This is probably a gtkentrycompletion bug, not an epiphany one. Maybe one of the key press handlers in gtkentry[completion] returns TRUE incorrectly.
Diego, are you sure that code gets called for page up/down? The completion handler for keypress returns TRUE without checking the state modifier... as I said I think returning FALSE for state == GDK_CONTROL_MASK would be what we want here I think.
*** Bug 363331 has been marked as a duplicate of this bug. ***
I think this is because of this code in gtkentrycompletion.c which eats Ctrl+PgDown/Ctrl+PgUp afaics. By the way, this could be the cause for bug #436864 too. Should we file a bug against GTK+ or I am missing something else? static gboolean gtk_entry_completion_popup_key_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data); if (!GTK_WIDGET_MAPPED (completion->priv->popup_window)) return FALSE; /* propagate event to the entry */ gtk_widget_event (completion->priv->entry, (GdkEvent *)event); return TRUE; }
Could the patch in bug 309035 help?
Don't think so; that's a completely different issue.
*** Bug 649489 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/epiphany/issues/110.