Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

User agent on iPad should default to a desktop one. #1290

Closed
iccub opened this issue Jul 24, 2019 · 3 comments · Fixed by #1425
Closed

User agent on iPad should default to a desktop one. #1290

iccub opened this issue Jul 24, 2019 · 3 comments · Fixed by #1425

Comments

@iccub
Copy link
Contributor

iccub commented Jul 24, 2019

Description:

Steps to Reproduce

  1. Visit a website

Actual result:

Expected result:

Reproduces how often: [Easily reproduced, Intermittent Issue]

Brave Version:

Device details:

Website problems only:

  • did you check with Brave Shields down?
  • did you check in Safari/Firefox (WkWebView-based browsers)?

Additional Information

@iccub iccub self-assigned this Jul 24, 2019
@Brandon-T
Copy link
Collaborator

Brandon-T commented Jul 24, 2019

Hmm.. this seems to have adverse effects (on iPad).
IE: if we change it to let firefoxUA = UIDevice.current.userInterfaceIdiom == .pad ? UserAgent.desktopUserAgent() : UserAgent.defaultUserAgent()

It will work.. however, sites like Youtube will disable fullscreen because they are checking for document.fullscreenEnabled || mozFullScreenEnabled || msFullscreenEnabled || document.webkitFullscreenEnabled ? true : false

but it always returns false on iOS WebKit (it's a bug because if you do videoElement.requestFullScreen() || videoElement.webKitRequestFullScreen()).. it works :(

Is it only for certain sites or all? Is there an option to select the user agent somewhere?

@iccub
Copy link
Contributor Author

iccub commented Jul 24, 2019

there's customUserAgent property in WKWebView, you can use it even now by tapping on Share button in menu and select request desktop site. I am not sure how robust this is

@kjozwiak
Copy link
Member

kjozwiak commented Sep 11, 2019

Verification PASSED on iPad Air 3rd Generation iOS 13.1 running 1.12 (19.09.11.15):

Screen Shot 2019-09-11 at 5 58 41 PM

  • Visited the following websites and ensured that the desktop version was being loaded:
    • youtube.com, amazon.com, ebay.com, coinmarketcap.com, facebook.com

Verification PASSED on iPad Air 3rd Generation iOS 13.1 running 1.12 (19.09.11.14):

Screen Shot 2019-09-11 at 6 32 04 PM

  • Visited the following websites and ensured that the desktop version was being loaded:
    • youtube.com, amazon.com, ebay.com, coinmarketcap.com, facebook.com

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.