After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353623 - Popup window of entry completion for the location entry prevents keyboard shortcuts and tab switching
Popup window of entry completion for the location entry prevents keyboard sho...
Status: RESOLVED OBSOLETE
Product: epiphany
Classification: Core
Component: Tabs
3.4.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 363331 649489 (view as bug list)
Depends on:
Blocks: 755518
 
 
Reported: 2006-08-31 00:42 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2018-12-28 08:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johan (not receiving bugmail) Dahlin 2006-08-31 00:42:09 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.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2006-10-03 09:27:19 UTC
Hmmm...

I don't find this useful but I think it's consistent to _always_ have the tab shortcuts available.

Comment 2 Christian Persch 2006-10-03 11:26:39 UTC
The autocompletion popup eats Ctrl-PageUp/Down, I don't think we can do anything about that.
Comment 3 Reinout van Schouwen 2007-08-12 10:46:50 UTC
Xan, your opinion?
Comment 4 Xan Lopez 2007-08-13 19:27:26 UTC
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.
Comment 5 Reinout van Schouwen 2007-08-13 21:13:42 UTC
Xan, if the key events aren't eaten, wouldn't that solve the problem?
Comment 6 Diego Escalante Urrelo (not reading bugmail) 2007-08-15 07:27:36 UTC
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?
Comment 7 Christian Persch 2007-08-15 21:11:10 UTC
This is probably a gtkentrycompletion bug, not an epiphany one. Maybe one of the key press handlers in gtkentry[completion] returns TRUE incorrectly.
Comment 8 Xan Lopez 2007-08-15 21:29:21 UTC
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.
Comment 9 Xan Lopez 2007-08-16 21:10:57 UTC
*** Bug 363331 has been marked as a duplicate of this bug. ***
Comment 10 Cosimo Cecchi 2008-02-10 22:32:46 UTC
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;
}
Comment 11 Reinout van Schouwen 2008-02-13 00:35:03 UTC
Could the patch in bug 309035 help?
Comment 12 Christian Persch 2008-02-13 01:11:21 UTC
Don't think so; that's a completely different issue.
Comment 13 Jean-François Fortin Tam 2012-10-08 03:35:17 UTC
*** Bug 649489 has been marked as a duplicate of this bug. ***
Comment 14 GNOME Infrastructure Team 2018-08-03 19:16:47 UTC
-- 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.