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

v-on:global_key_down会一直影响到navigate的下一个界面 #63

Open
Tracker647 opened this issue Oct 15, 2024 · 1 comment
Open

Comments

@Tracker647
Copy link

Tracker647 commented Oct 15, 2024

三级页面,第一级home, home有一个导航按钮,不做任何按键回调,从home点击按钮导航到next_page。
next_page两个按钮都设置按键回调, F2到下一级页面,ESCAPE回去,测试正常。
到了第三级页面next_page2,按钮不做任何按键回调,发现next_page设置的v-on回调还在响应,能ESCAPE回去,影响正常的程序逻辑,预想v-on作用域应该在界面以内的。

用on:key_down就没有问题。
这个是bug吗?是否考虑处理?

home_page

<window name="home_page" >
  <button name="button" x="383" y="387" w="100" h="36" v-on:click="{navigate, Args=next_page}" text="next_page"/>
</window>

next_page

<window name="next_page" v-on:global_key_down:f2="{navigate, Args=next_page2}" v-on:global_key_down:escape="{fscript, Args=back()}">
  <button on:click="back()" name="button" x="288" y="274" w="100" h="36" text="home_page"/>
  <button v-on:click="{navigate, Args=next_page2}" name="button" x="406" y="274" w="100" h="36" text="next_page"/>
</window>

next_page2

  <button on:click="back()" name="button" x="308" y="407" w="100" h="36" text="last_page"/>
</window>
@ufbycd
Copy link

ufbycd commented Nov 10, 2024

文档里有说,docs/11.command_binding.md, 带 global的是全局的即使窗口在后台也可以收到事件,你这应该用不带globalkey_down之类的事件。

看文档不能太粗心呀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants