fix(desktop): Fixed issue where some links on desktop would not correctly open in the browser
This commit is contained in:
@@ -7,7 +7,7 @@ import PreferencesMenuItem from './PreferencesComponents/MenuItem'
|
||||
import { PreferencesMenu } from './PreferencesMenu'
|
||||
import { PreferenceId } from '@standardnotes/ui-services'
|
||||
import { useApplication } from '../ApplicationProvider'
|
||||
import { classNames } from '@standardnotes/snjs'
|
||||
import { classNames, Environment } from '@standardnotes/snjs'
|
||||
import { isIOS } from '@/Utils'
|
||||
|
||||
type Props = {
|
||||
@@ -49,6 +49,9 @@ const PreferencesMenuView: FunctionComponent<Props> = ({ menu }) => {
|
||||
if (application.isNativeMobileWeb()) {
|
||||
application.mobileDevice().openUrl(link)
|
||||
return
|
||||
} else if (application.environment === Environment.Desktop) {
|
||||
application.desktopDevice?.openUrl(link)
|
||||
return
|
||||
}
|
||||
|
||||
window.open(link, '_blank')
|
||||
|
||||
Reference in New Issue
Block a user