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.
(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.
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.
Here is an existing issue report: https://gitlab.gnome.org/GNOME/gtk/issues/735 Discussion should continue there.
Reopening since we're going to stop using GtkMessageDialog in bug #189545