Bug 256080 - [GTK4] Emoji chooser popover does not point to the caret location
Summary: [GTK4] Emoji chooser popover does not point to the caret location
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 256082 276309 (view as bug list)
Depends on:
Blocks: GTK4
  Show dependency treegraph
 
Reported: 2023-04-28 01:06 PDT by Adrian Perez
Modified: 2024-09-08 08:07 PDT (History)
6 users (show)

See Also:


Attachments
Screenshot showing the emoji chooser opened at the wrong location (827.17 KB, image/png)
2023-04-28 01:06 PDT, Adrian Perez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2023-04-28 01:06:17 PDT
Created attachment 466124 [details]
Screenshot showing the emoji chooser opened at the wrong location

Opening the emoji chooser with Ctrl-; always shows the popover pointing
to the top-left corner of the web view widget. The correct thing to do
would be to point at the current location of the text caret. Note that
this is only a GTK4 issue, GTK3 works well.
Comment 1 Adrian Perez 2023-04-28 01:37:39 PDT
*** Bug 256082 has been marked as a duplicate of this bug. ***
Comment 2 Adrian Perez 2023-04-28 01:38:01 PDT
Some investigation: using the “Insert Emoji” option from the
context menu for the input field works as expected, and code
execution goes through webkitWebViewBaseShowEmojiChooser() and
emojiChooserClosedemojiChooserEmojiPicked() -- it's only using
the keyboard to open the chooser with Ctrl-; that doesn't work
and these two functions aren't executed.
Comment 3 Adrian Perez 2023-04-28 04:48:38 PDT
(In reply to Adrian Perez from comment #2)
> Some investigation: using the “Insert Emoji” option from the
> context menu for the input field works as expected, and code
> execution goes through webkitWebViewBaseShowEmojiChooser() and
> emojiChooserClosedemojiChooserEmojiPicked() -- it's only using
> the keyboard to open the chooser with Ctrl-; that doesn't work
> and these two functions aren't executed.

Using Ctrl-. or Ctrl-; does NOT result in the insertEmojiCallback()
function from Source/WebKit/UIProcess/gtk/KeyBindingTranslator.cpp
being called. I think GTK is trying to handle popping the chooser
by itself, so of course it does not know where to input the picked
emoji nor it knows where to point the popover to (because we are
only setting the parent, the default position is 0,0).
Comment 4 zyx 2024-09-08 08:07:38 PDT
*** Bug 276309 has been marked as a duplicate of this bug. ***