Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#22595 closed defect (bug) (worksforme)

iPad Image Un-Select Alternates Between 1 and 2 Taps

Reported by: miqrogroove Owned by:
Priority: low Milestone:
Component: Media Version: 3.5
Severity: minor Keywords: needs-testing has-patch
Cc:

Description

Steps to reproduce:

  1. Open the new media modal.
  2. Go to the Media Library tab.
  3. Select (tap) an image.
  4. Un-select the image by tapping on the blue check mark.

Expected Result:

Image selection removed.

Actual Result:

Every-other attempt is successful on first tap. Otherwise, a second tap is required.

Attachments (2)

22595.patch (1.7 KB) - added by azaozz 6 months ago.
mobile-events-test.html (2.4 KB) - added by azaozz 6 months ago.

Download all attachments as: .zip

Change History (14)

Additionally: with multiple images selected, tapping on the grey check marks on various images has seemingly random results.

Ah. This is due to the hover state attempting to kick in before the click event. We should probably just disable the hover state on mobile devices.

  • Milestone changed from Awaiting Review to 3.5
  • Keywords needs-testing needs-patch added
  • Priority changed from normal to low

Haven't been able to find a way to consistently disable or override the hover event on iOS. Patches and documentation of other OS behavior welcome.

Generally touchstart works better than click in iOS Safari and if cancelled prevents the fake 'click` event from firing. Perhaps we can use that, not for Android though. Will look into it this afternoon.

azaozz6 months ago

22595.patch fixes this for iOS6 Safari. It uses 'touchstart' instead of 'click' to select, deselect and remove from selection. Only tested on iPad but should work the same on all other iOS6.

  • Keywords has-patch added; needs-patch removed

azaozz6 months ago

mobile-events-test.html​ is a small test of mouse events for touchscreen devices/browsers.

Results for iOS Safari:

touchstart
touchend
mouseover
mousedown
mouseup
click
------------------
touchstart (prevented)
touchend
------------------
touchstart
touchend (prevented)
------------------

and for Android 2.1 (Kindle Fire 1)

touchstart
touchend
mouseover
mousedown
mouseup
click
------------------
touchstart (prevented)
touchend
------------------
touchstart
touchend (prevented)
mouseover
mousedown
mouseup
click
------------------

Preventing default for touchstart cancels the emulated mouse events in both, preventing it for touchend cancels them in iOS but not in Android 2.1. Would be good to see what happens in Android 4 :)

Looking at the ticket further: the unselecting of images/attachments by touching the checkmark seems to work properly in iOS Safari now. We probably can attach it to both touchstart and click, and cancel both.

  • Milestone 3.5 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Closing as worksforme for now. If this still persists, can reopen and add 'touchstart' event there too.

As discussed in IRC. If this is still occurring, please reopen this ticket.

reading...

Seems fixed on 3.5-RC2-22958. Thanks :)

Note: See TracTickets for help on using tickets.