Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#48425 new defect (bug)

`wp_is_mobile()` doesn't detect iPad Safari anymore

Reported by: manuelmasia's profile manuelmasia Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:


With iOS 13.1.3 (at least) wp_is_mobile() doesn't detect Safari on iPad anymore, $_SERVER['HTTP_USER_AGENT'] returns now exactly the same result you get on desktop.

Change History (2)

#1 @chrisvanpatten
5 years ago

Safari on the iPad now registers itself as a desktop browser in its user agent, so I'm not sure it's possible to detect that it's actually Safari on iPad.

I'm also not sure it would be advisable — the idea behind the change is to bring parity between Safari on Desktop and Safari on iPad, in terms of functionality. As such, classifying it as a mobile browser might not be the most accurate classification anymore.

Last edited 5 years ago by chrisvanpatten (previous) (diff)

#2 @johnbillion
5 years ago

  • Version 5.2.4 deleted

This function is only really used in core to determine whether a browser support touch, which is better done client side. See #33704. I think this function's days are numbered.

I presume this particular issue manifests itself by not showing action links on list tables in iPad Safari? If so, we should switch to client side detection for this, or just remove the show-actions-on-hover functionality.

Note: See TracTickets for help on using tickets.