GtkLabel with links always consumes click events
GtkLabel
doesn't propagate click events back to its parent widget if there are <a>
tags in its label
property.
This feels like a regression since GTK3 handles such cases properly, and there is no apparent way to mitigate this in GTK4.
If needed, I can provide an example xml file for GtkBuilder
.
Steps to reproduce
- Create a
GtkLabel
with one or more<a>
tags in itslabel
property. - Create another
GtkLabel
with plain text for contrast. - Append the labels into a
GtkListBox
withselection-mode
set tonone
- Connect the
row-activated
signal. - Click the rows.
Current behavior
The signal will fire for the first row if the user clicks outside the links. Only rows that contain plain text trigger the signal.
Expected outcome
If no link was actually clicked, GtkLabel
should propagate the event further so that its parent can handle it. As far as GtkListBox
is concerned, it should fire the row-activated
signal.
Version information
Tested against GTK 4.3.1 and 3.24.25, with the latter behaving properly.