vaadin / flow-components

Java counterpart of Vaadin Web Components
101 stars 66 forks source link

[grid] double click event not fired on iOS with Safari in Vaadin 23.1.1 #3372

Open SteMoeller opened 2 years ago

SteMoeller commented 2 years ago

Description

A double click in a Grid Item under Vaadin 23 on iOS with Safari has no effect - in particular, the event is not fired when double clicking a grid. This behavior is reproducible on an iPhone with iOS 15.4.1 and Safari. With an Android device it works as expected.

Expected outcome

The event should be fired.

Minimal reproducible example

    Grid<String> testGrid = new Grid<>();
        testGrid.addColumn(a -> a);
        testGrid.addItemDoubleClickListener(a -> {
            Notification notification = new Notification();
            notification.setText("Item : " + a.getItem());
            notification.setDuration(5000);
            notification.open();
        });
        testGrid.setItems(Arrays.asList("One", "Two", "Three", "Four", "Five"));
        add(testGrid);

Steps to reproduce

  1. Add the snippet to a view
  2. open the view on iOS
  3. double click the grid

Environment

Vaadin version(s): 23.1.1 iOS: 15.4.1

Browsers

Safari on iOS

SteMoeller commented 2 years ago

Originally posted on stackoverflow: https://stackoverflow.com/questions/72691772/double-click-event-not-fired-on-ios-safari-using-vaadin-grid Got the hint to put it here... so...

web-padawan commented 2 years ago

Thanks for the issue. It's a known bug specific to iOS Safari, we have a workaround in vaadin-grid-pro that could be reused.

SteMoeller commented 2 years ago

Ah cool, I'll give it a try... is it allowed to copy and use the part without a valid pro subscription?

knoobie commented 1 year ago

Still a problem with 24.1 and latest iOS / Safari.