WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
189463
[GTK] Mark text in javascript alerts as selectable
https://bugs.webkit.org/show_bug.cgi?id=189463
Summary
[GTK] Mark text in javascript alerts as selectable
Benjamin Berg
Reported
2018-09-09 04:03:12 PDT
Alerts from Javascript are currently not selectable, making it impossible to copy the text from them. It may be useful to copy text from such alerts for various reasons (e.g. passing on to support, copying into a translation engine) and doing so should be easy. Michael said that this would require changes in WebKitScriptDialogGtk.cpp and WebKitWebViewBase.cpp (
https://gitlab.gnome.org/GNOME/epiphany/issues/528
). I expect it should be as simple as setting the "selectable" property of GtkLabel.
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2018-09-11 22:39:07 PDT
(In reply to Benjamin Berg from
comment #0
)
> I expect it should be > as simple as setting the "selectable" property of GtkLabel.
I can confirm this fixes the issue. But I can reproduce the same issue in GNOME Chess. Move any chess piece, then press the open button and try to select the text in the "Save this game before loading another one?" message box that pops up. You can't. It's a general issue with GtkMessageDialog. I found this code in gtk_message_dialog_init(): settings = gtk_widget_get_settings (GTK_WIDGET (dialog)); g_object_get (settings, "gtk-keynav-use-caret", &use_caret, NULL); gtk_label_set_selectable (GTK_LABEL (priv->label), use_caret); gtk_label_set_selectable (GTK_LABEL (priv->secondary_label), use_caret); So it seems intentional. CC Benjamin Otte. Should we change that? If so, this will need to pingpong back to gitlab.gnome.org.
Michael Catanzaro
Comment 2
2018-09-11 22:42:14 PDT
It was changed in
https://gitlab.gnome.org/GNOME/gtk/commit/92662828ba43c2d3507bb8f4dc253f2f429e91ae
""" We used to always make the labels in message dialogs selectable, which is a bit problematic wrt. to keynav - the label can unexpectedly 'turn blue', which irritates some people. With the new gtk-keynav-use-caret setting, we can now only make the labels selectable when it is required for accessibilty reasons. """ So I am going to say this is WONTFIX on WebKit's end. Please talk to Matthias and the other GTK+ developers about it.
Michael Catanzaro
Comment 3
2018-09-11 22:43:51 PDT
Here is an existing issue report:
https://gitlab.gnome.org/GNOME/gtk/issues/735
Discussion should continue there.
Michael Catanzaro
Comment 4
2018-09-13 08:00:48 PDT
Reopening since we're going to stop using GtkMessageDialog in
bug #189545
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug