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 740554 - OSK interacts badly with Firefox and Epiphany 'awesomebar', requiring multiple keypresses to enter URLs
OSK interacts badly with Firefox and Epiphany 'awesomebar', requiring multipl...
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
3.26.x
Other Linux
: Normal major
: ---
Assigned To: mutter-maint
mutter-maint
: 738785 739636 741124 759551 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-11-22 20:37 UTC by Adam Williamson
Modified: 2021-07-05 13:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch replacing popup window with a gtkpopover (5.97 KB, patch)
2015-07-23 20:28 UTC, Jan-Michael Brummer
none Details | Review
Example screenshot showing epiphany using a gtkentry with popovers (215.00 KB, image/png)
2015-07-23 20:29 UTC, Jan-Michael Brummer
  Details
visual comparison (42.49 KB, image/png)
2015-08-03 13:12 UTC, Allan Day
  Details
gtk entry with popover - no border (182.86 KB, image/png)
2015-08-03 13:29 UTC, Jan-Michael Brummer
  Details
gtk entry completion with popover and no border/frame (6.79 KB, patch)
2015-08-03 22:52 UTC, Jan-Michael Brummer
none Details | Review
gtk entry completion using popover and no border/frame (202.51 KB, image/png)
2015-08-03 22:53 UTC, Jan-Michael Brummer
  Details

Description Adam Williamson 2014-11-22 20:37:38 UTC
Trying to enter a URL in Firefox's 'awesomebar' URL entry field is somewhat difficult with the GNOME OSK.

Each time you enter a character, Firefox shows and updates a list of suggested completions (this is the 'awesomebar' functionality). Unfortunately it seems that clicking a key on the OSK the first time after this list is shown only causes the completion list to go away; it doesn't actually enter the character. You have to click the key a *second* time to actually enter the character (and cause an updated completion list to appear).

So every character entry after the first when typing a URL into Firefox with the OSK requires two clicks on the key.

This is not how a real keyboard behaves. Hitting a key just one time causes the character to be entered and the 'awesomebar' completion list to be updated.

This makes using Firefox without a USB keyboard rather tedious.
Comment 1 Adam Williamson 2014-11-22 20:39:13 UTC
This exact same behaviour is in fact visible with Epiphany as well, which does a similar 'awesomebar'-ish completion trick.
Comment 2 Adam Williamson 2014-12-24 15:57:19 UTC
*** Bug 741124 has been marked as a duplicate of this bug. ***
Comment 3 Michael Shigorin 2014-12-24 16:15:31 UTC
*** Bug 741124 has been marked as a duplicate of this bug. ***
Comment 4 Adam Williamson 2014-12-24 16:18:27 UTC
there's a suggestion in #741124 to re-assign to GTK+, so let's try that.
Comment 5 Michael Shigorin 2015-01-30 14:21:02 UTC
CCing Claudio as an excuse for "what's up?" ping.
Comment 6 Jan-Michael Brummer 2015-07-06 20:31:55 UTC
This is issue is only occurring if a gtkentry (completion) is used. As soon as a gtkentry with a popover menu is used it works without a problem. Popover menu even stays below OSK. Seems to be a problem related to the z position of the widget.
Comment 7 Carlos Garnacho 2015-07-07 14:12:48 UTC
From my investigation, this is not a bug in gtk+ per-se. The completion popup is dismissed due to the "pointer emulated" ButtonPress event being replayed, so the browser receives it as a "click outside" (despite also receiving the OSK key events), and the window is hidden.

The button press is however not replayed if there's no grab in effect, like in the popover case. Why does this happen deserves some more investigation, but points to mutter and upwards, I'm moving this bug to mutter.
Comment 8 Michael Shigorin 2015-07-07 14:59:14 UTC
(In reply to Jan-Michael Brummer from comment #6)
> As soon as a gtkentry with a popover menu is used it works without a problem.
Any test patch? :)
Comment 9 Jan-Michael Brummer 2015-07-17 20:31:58 UTC
I haven't modified gtkentry for this purpose, but simply connected a gtkpopover to a gtkentry without completion. As a simple example just take a look at gnome maps which also implements this behaviour.
Comment 10 Jan-Michael Brummer 2015-07-23 20:28:39 UTC
Created attachment 308035 [details] [review]
Patch replacing popup window with a gtkpopover

Adding a first patch for replacing gtk entry completion window with a popover. 

This version is finally working fine with gnome on-screen keyboard:
 - No longer double tapping a letter to add it to the entry field (and closing the window)
 - popover stays behind osk and does not interfere with it

Downside: Popover can only be a part (visible) of the main window on x.

PS: Sorry for this classic diff-patch, but git clone is too slow atm.
Comment 11 Jan-Michael Brummer 2015-07-23 20:29:54 UTC
Created attachment 308036 [details]
Example screenshot showing epiphany using a gtkentry with popovers
Comment 12 Michael Shigorin 2015-07-29 08:52:17 UTC
Looks funny but is actually usable on a tablet indeed, thank you!
Comment 13 Allan Day 2015-08-03 13:12:54 UTC
Created attachment 308677 [details]
visual comparison

Thanks for the patch and screenshot, Jan-Michael!

Some other applications are using popovers for their search suggestions (Maps is the example that immediately comes to mind). I have to say that I'm not entirely sure about this.

Popovers are disconnected from the search box itself, and introduce more visual noise. Also: they are pointy, which means they are best used when they are triggered from a specific point on the screen. This isn't the case with a search box.

I personally feel that a simple rectangular container is easier to read, coherent, and visually appealing - see the mockups for a comparison.
Comment 14 Jan-Michael Brummer 2015-08-03 13:23:28 UTC
Note: We can somewhat reduce that noise if we simply remove the 6px border from  popover. In case that it matters...
Comment 15 Jan-Michael Brummer 2015-08-03 13:29:48 UTC
Created attachment 308679 [details]
gtk entry with popover - no border
Comment 16 Michael Shigorin 2015-08-03 16:58:42 UTC
This one looks better indeed.
Comment 17 Jan-Michael Brummer 2015-08-03 22:52:59 UTC
Created attachment 308706 [details] [review]
gtk entry completion with popover and no border/frame

Updated patch: Removed border and frame to make it slick.
Comment 18 Jan-Michael Brummer 2015-08-03 22:53:47 UTC
Created attachment 308707 [details]
gtk entry completion using popover and no border/frame
Comment 19 Michael Shigorin 2016-06-14 11:57:37 UTC
ping
Comment 20 Carlos Garnacho 2016-06-14 17:12:56 UTC
I am sorry, but I don't think that changing the widgetry is enough of an universal fix. The same input pattern performed by GtkEntryCompletion may be (and as a matter of fact, is) implemented in other places.

I see this rather as an artifact with X11, the application has (rightfully) set up an active pointer grab, so the Xserver will redirect the input to it, and there's nothing gnome-shell can do to prevail in capturing input.

At this point, I rather have hopes to fix this in wayland, because there are no such input redirection concerns there (after all the compositor is in control of it). There is a newer version of the "text input" wayland protocol that's being discussed currently, which intends to cater for OSKs, once that's consolidated and implemented in mutter/gnome-shell, this will be magically fixed there.
Comment 21 Michael Shigorin 2016-06-14 20:11:56 UTC
My observation is that when people:
- break all of the existing UX for something new like "touch input";
- don't actually even *try* to use their code in that target environment
  (e.g. GNOME < 3.14 was *completely* unusable on a tablet for me);
- still blame the existing code,
no new and shiny frameworks will really help the mindset.

Sorry if this sounds harsh but I've actually used Plasma Active and Enlightenment with X11 on a Nexus 7 a few years ago while experimenting with ARM Linux and I don't recall a problem like this one; maybe they *did* eat their own dogfood after all.

Back to the bug report: is there anything that could be done to instruct the application -- or maybe the relevant library in the whole stack busy with handling this particular event -- to avoid setting up grabs when OSK is active?

Thank you for the reply!
Comment 22 Carlos Garnacho 2016-06-15 13:58:45 UTC
(In reply to Michael Shigorin from comment #21)

<snip misinformed rant>

> 
> Back to the bug report: is there anything that could be done to instruct the
> application -- or maybe the relevant library in the whole stack busy with
> handling this particular event -- to avoid setting up grabs when OSK is
> active?

You can locally patch gtk+ or the X server, and enjoy a fantastically broken desktop.
Comment 23 Michael Shigorin 2016-06-15 14:38:58 UTC
We've locally patched gtk+ with Michael's popover patch from comment 10
so that typing an URL into the browser isn't fantastically broken as described.
It's not a perfect solution but it *is* a solution indeed.
Comment 24 Carlos Garnacho 2016-08-10 12:04:12 UTC
FWIW, as per mutter/gnome-shell master the OSK works on wayland (bug #765009), this is not an issue there.
Comment 25 Jan-Michael Brummer 2016-12-26 10:32:12 UTC
Quick note: I can still see this issue on one of my tablets using wayland. Seems there is still a problem on wayland.
Comment 26 Carlos Garnacho 2016-12-26 11:27:41 UTC
(In reply to Jan-Michael Brummer from comment #25)
> Quick note: I can still see this issue on one of my tablets using wayland.
> Seems there is still a problem on wayland.

It works here with epiphany and gtk3-demo's entry completion demo, both with GDK_BACKEND=x11 set and unset, so you'll have to be a bit more specific... Moreover, I'd say that both related symptoms (completion window appearing on top of OSK and having to dismiss the completion window before pressing the next OSK key) are pretty much distinctive signs that you are running X11, because how override-redirect windows and grabs work.

Running as a wayland compositor, mutter fully controls the stacking of the windows that were traditionally override-redirect, and there's no windowing-level grab going on which could possibly take input away from the OSK.

How did you check that you're running on wayland? can you run pure-wayland clients like weston-terminal?
Comment 27 Jan-Michael Brummer 2016-12-27 20:48:33 UTC
Thanks for your feedback, i did a complete reinstall and now it is working on every tablet. Don't know what was wrong. Sorry for the noise.
Comment 28 Michael Shigorin 2017-04-03 09:48:03 UTC
ping
Comment 29 Carlos Garnacho 2017-07-13 09:46:34 UTC
*** Bug 739636 has been marked as a duplicate of this bug. ***
Comment 30 Alexandre Franke 2017-12-07 21:15:18 UTC
*** Bug 738785 has been marked as a duplicate of this bug. ***
Comment 31 Michael Catanzaro 2018-01-29 23:16:52 UTC
*** Bug 759551 has been marked as a duplicate of this bug. ***
Comment 32 GNOME Infrastructure Team 2021-07-05 13:48:07 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/mutter/-/issues/

Thank you for your understanding and your help.