Firefox support for Monaco editors

Parts of the spacelift UI that embed the Monaco editor do not work on firefox, due to a minor bug in the way that the embed wrapper checks the OS, in order to format the aria strings.

Workaround
Use a different browser, or patch manually with a devtools source override.
Problem
``` const getPlatformString = (): string => { if ( "userAgentData" in navigator && "platform" in navigator.userAgentData && navigator.userAgentData?.platform ) { return String(navigator.userAgentData.platform); } else if (navigator.platform) { // Fallback to the deprecated navigator.platform property. return navigator.platform; } return ""; }; ``` In the above code block, on Firefox, "navigator.userAgentData" exists but has a value of undefined, meaning that the in check errors. Adding "&& navigator.userAgentData" to the if check will fix the issue and allow the editor to work normally on Firefox.

Please authenticate to join the conversation.

Upvoters
Status

➑️ Planned

Board

πŸ’‘ Feature Requests

Date

9 months ago

Subscribe to post

Get notified by email when there are changes.