Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 打包notion路由跳转时候整屏幕刷新的 #678

Open
1 of 2 tasks
ChasLui opened this issue Mar 7, 2024 · 3 comments
Open
1 of 2 tasks

[Bug] 打包notion路由跳转时候整屏幕刷新的 #678

ChasLui opened this issue Mar 7, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@ChasLui
Copy link

ChasLui commented Mar 7, 2024

Search before asking

  • 我在 issues 列表中搜索,没有找到类似的内容。
    I searched in the issues and found nothing similar.

Pake version

2.3.6

System version

macOS 14.3.1 (23D60)

Node.js version

v21.7.0

Minimal reproduce step

pake https://www.notion.so/ --name Notion --icon "https://www.notion.so/front-static/favicon.ico" --inject ./Notion\ Chinese.js

What did you expect to see?

期望可以正常使用notion, 不整页刷新

What did you see instead?

每次切换page都整页刷新了.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@ChasLui ChasLui added the bug Something isn't working label Mar 7, 2024
@globalexport
Copy link

I was able to fix this for MacOS in src-tauri/src/inject/event.js:

  const detectAnchorElementClick = (e) => {
    const anchorElement = e.target.closest('a');
    if (anchorElement && anchorElement.href) {
      if (anchorElement.target !== '') anchorElement.target = '_self'; // <-- added this line to fix for MacOS
      ...

But it does not work for my app as Windows build via Github Actions.
I am unable to debug the behavior in Windows because I do not find a way to enable the developer tools there.
I tried to enable devtools like so:
https://tauri.app/v1/guides/debugging/application/#:~:text=To%20enable%20the%20devtools%20in%20production%20builds
Sadly, it has no effect. Does anybody know how to achieve this with Pake?

@tw93
Copy link
Owner

tw93 commented Apr 6, 2024

You can open this devtools using the local debugging of Pake code, or via the command line with pake-cli, and you're also more than welcome to submit pr for support!

@globalexport
Copy link

Hi @tw93!

Maybe this is a misunderstanding. I am on MacOS and I cannot open devtools in the Windows build on another computer. I have no Windows environment to run npm run dev to locally debug there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@tw93 @ChasLui @globalexport and others