Improve UX, prevent flicker, jump into editor seamlessly (#53)

Co-authored-by: Eric Clemmons <eric@smarterspam.com>
This commit is contained in:
Yoki
2022-06-25 03:14:02 +08:00
committed by GitHub
parent eaad7257af
commit ad849e4daf

View File

@@ -44,7 +44,7 @@ export function ClickToComponent({ editor = 'vscode' }) {
const url = `${editor}://file/${path}`
event.preventDefault()
window.open(url)
window.location.assign(url)
setState(State.IDLE)
}
@@ -56,7 +56,7 @@ export function ClickToComponent({ editor = 'vscode' }) {
function handleClose(returnValue) {
if (returnValue) {
const url = `${editor}://file/${returnValue}`
window.open(url)
window.location.assign(url)
}
setState(State.IDLE)