Bug 8055 - Buttons in Safari on iOS does not visually react to click
Summary: Buttons in Safari on iOS does not visually react to click
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Access (show other bugs)
Version: trunk
Hardware: iPad iOS
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-20 11:14 CET by Linn
Modified: 2023-05-17 14:48 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Linn cendio 2022-12-20 11:14:38 CET
When changing the Web Access appearance in bug 7908, we removed the -webkit-tap-highlight-color. This causes Safari on iOS to no longer give any visual feedback when pressing buttons. This behaviour is a regression compared to 4.14.0.

Our buttons have :active styling, which works on other platforms as well as other browsers in Safari. 

The problem does not occur when using a trackpad on iOS.
Comment 1 Linn cendio 2022-12-20 12:46:56 CET
Note that this visual bug only occurs if there is no event listener on any outer element from the button or the button itself. E.g., for the buttons in the sidebar and "extra keys" (shown when logged in to webaccess), a press is shown just fine since they have an event listener that makes the sidebar fade when inactive.

A solution that has been recommended by Apple is using 'ontouchstart' with an empty value just to get an event listener attached to the object, see:
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/AdjustingtheTextSize/AdjustingtheTextSize.html

Another solution is to set 'ontouchstart' on the body element itself, but this feels a bit more hacky:
https://stackoverflow.com/questions/3885018/active-pseudo-class-doesnt-work-in-mobile-safari

Both these methods successfully makes the button give visual feedback when pressed.
Comment 2 Linn cendio 2022-12-22 10:08:31 CET
Here is a webkit bug for this:
https://bugs.webkit.org/show_bug.cgi?id=138816

Note that it was reported 2014 and there are no clear indications if this will ever be fixed.

Note You need to log in before you can comment on or make changes to this bug.