text icon indicating copy to clipboard operation
text copied to clipboard

Using the UserAgent string for detecting the platform is deprecated by Chrome

Open susnux opened this issue 3 years ago • 0 comments

Describe the bug From #2762 (comment) related to this code: https://github.com/nextcloud/text/blob/a84d082de3ce888ffe7b68c764bddbf2ff45a193/src/components/Menu/keys.js#L1

navigator.platform is deprecated but using the user agent string is also deprecated by Chrome. The future way of handling user agent related things is to use user agent client hints.

Currently client hints are not widely (currently missing Firefox and Safari) implemented, so this is bug is a reminder for possible future compatibility problems with chrome.

susnux avatar Aug 01 '22 13:08 susnux