-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Description
I'm experiencing a weird behaviour in Vaadin 24.8.6 while emulating an iPad with touch simulation enabled on both Chrome and Firefox. Also reproduced on an actual iPad using Firefox.
I noticed that when clicking a clear button (of a Textfield or ComboBox), the blur listener of the component I'm currently focusing does not trigger (which can be a Textfield, ComboBox but also a Button).
This is particularly problematic for more complex scenarios:
when the focused button is part of a grid row and the Textfield is used to filter said grid, if I filter something by writing in the Textfield, click on a grid row button and then clear the grid filter by tapping on the Textfield's X icon, the grid row button's blur listener does not trigger, and never will because meanwhile the Textfield filter made the grid rows refresh so grid row buttons and blur listeners are re-rendered
Expected outcome
The blur listener should trigger regardless because I'm blurring away from the component
Minimal reproducible example
TextField tf1 = new TextField();
TextField tf2 = new TextField();
tf1.setClearButtonVisible(true);
tf2.setClearButtonVisible(true);
tf1.addBlurListener(ev -> Notification.show("BLUR ONE"));
tf2.addBlurListener(ev -> Notification.show("BLUR TWO"));
add(tf1, tf2);
Steps to reproduce
- Write something in a Textfield
- Focus the other Textfield (blur notification should appear)
- Tap on the X clear icon of the first Textfield where something was written
- Notice how blur notification for the secondo Textfield does not appear
Environment
Vaadin version(s): 24.8.6
Reproduced using Windows in both Chrome and Firefox (when emulating an iPad with touch-screen simulation enabled) and in an actual iPad using latest iOS and Firefox
Browsers
Chrome, Firefox