diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2018-04-09 10:32:34 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2018-04-09 10:53:33 -0500 |
commit | 543fd1ac06ba2243405fc360766a10f65545cc86 (patch) | |
tree | 903a448194d282de0d460806e2467971d1ef49ca | |
parent | 56d2fe7f25dd17509abbc564bdc07a68aa7d9ca7 (diff) | |
download | epiphany-543fd1ac06ba2243405fc360766a10f65545cc86.tar.gz |
Don't search on ' or /
This causes problems in practice on certain websites (e.g. Facebook,
Riot) where the key press is handled by both the web page and the
browser. I'm guessing these sites are not using normal text entries.
Anyway, these are really niche shortcuts when the much more common
Ctrl+F is available, which does not have any web compat implications.
https://bugzilla.gnome.org/show_bug.cgi?id=795083
-rw-r--r-- | embed/ephy-find-toolbar.c | 30 | ||||
-rw-r--r-- | src/ephy-window.c | 2 |
2 files changed, 1 insertions, 31 deletions
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c index a9a03d3dd..9b3ebb75d 100644 --- a/embed/ephy-find-toolbar.c +++ b/embed/ephy-find-toolbar.c @@ -134,32 +134,6 @@ clear_status (EphyFindToolbar *toolbar) webkit_find_controller_search_finish (toolbar->controller); } -/* Code adapted from gtktreeview.c:gtk_tree_view_key_press() and - * gtk_tree_view_real_start_interactive_seach() - */ -static gboolean -tab_search_key_press_cb (WebKitWebView *web_view, - GdkEventKey *event, - EphyFindToolbar *toolbar) -{ - GtkWidget *widget = (GtkWidget *)toolbar; - - g_assert (event != NULL); - - /* check for / and ' which open the find toolbar in text resp. link mode */ - if (gtk_search_bar_get_search_mode (GTK_SEARCH_BAR (widget)) == FALSE) { - if (event->keyval == GDK_KEY_slash) { - ephy_find_toolbar_open (toolbar, FALSE, TRUE); - return TRUE; - } else if (event->keyval == GDK_KEY_apostrophe) { - ephy_find_toolbar_open (toolbar, TRUE, TRUE); - return TRUE; - } - } - - return FALSE; -} - static void real_find (EphyFindToolbar *toolbar, EphyFindDirection direction) @@ -562,10 +536,6 @@ ephy_find_toolbar_set_web_view (EphyFindToolbar *toolbar, toolbar); clear_status (toolbar); - - g_signal_connect_object (EPHY_WEB_VIEW (web_view), "search-key-press", - G_CALLBACK (tab_search_key_press_cb), - toolbar, 0); } } diff --git a/src/ephy-window.c b/src/ephy-window.c index 3d90f2610..e7aa10f56 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -93,7 +93,7 @@ const struct { { "win.zoom-out", { "<Primary>minus", "<Primary>KP_Subtract", "ZoomOut", NULL } }, { "win.zoom-normal", { "<Primary>0", "<Primary>KP_0", NULL } }, { "win.print", { "<Primary>P", NULL } }, - { "win.find", { "<Primary>F", "Search", NULL } }, + { "win.find", { "<Primary>F", NULL } }, { "win.find-prev", { "<shift><Primary>G", NULL } }, { "win.find-next", { "<Primary>G", NULL } }, { "win.bookmark-page", { "<Primary>D", "AddFavorite", NULL } }, |