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

Database cursor focus is no longer automatically reset to the title input #10732

Closed
3 tasks done
Shina-SG opened this issue Mar 25, 2024 · 9 comments
Closed
3 tasks done
Assignees
Milestone

Comments

@Shina-SG
Copy link

Shina-SG commented Mar 25, 2024

When creating too fast the cursor is at the database name rather than the new row name

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

The cursor would move to the Database name rather than the new row name when after finishing one row and create another too fast (below 1.5 second from my testing).

Steps to reproduce the bug:

  1. Create or use an existed Database.
  2. Hit add to create new row and fill in the name.
  3. Then hit add again instantly (should be 2 clicks, one click to exit the current row name box, and one to hit the add).

Expected result

It should still default the cursor at the new row name rather than the Database name.

Screenshot or screen recording presentation

SiYuan_KNFOClsSW6.mp4

Version environment

- Version: v3.0.4
- Operating System: Windows 11
- Browser (if used):

Log file

Dev.zip

I 2024/03/25 11:06:59 working.go:146: 
      ___                                   ___           ___           ___
     /  /\        ___           ___        /__/\         /  /\         /__/\
    /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
   /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
  /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
 /__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
 \  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
  \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
   \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
     /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
     \__\/                                 \__\/         \__\/         \__\/
I 2024/03/25 11:06:59 runtime.go:74: kernel is booting:
    * ver [3.0.4]
    * arch [amd64]
    * os [Microsoft Windows 11 IoT Enterprise]
    * pid [14000]
    * runtime mode [prod]
    * working directory [C:\Users\Administrator\AppData\Local\Programs\SiYuan\resources]
    * read only [false]
    * container [std]
    * database [ver=20220501]
    * workspace directory [C:\Shina\Dev]
I 2024/03/25 11:06:59 conf.go:156: initialized language [en_US] based on device locale
I 2024/03/25 11:06:59 runtime.go:123: use network proxy [system]
I 2024/03/25 11:06:59 serve.go:115: kernel [pid=14000] http server [127.0.0.1:63462] is booting
I 2024/03/25 11:06:59 database.go:89: the database structure is changed, rebuilding database...
I 2024/03/25 11:06:59 database.go:109: reinitialized database [C:\Shina\Dev\temp\siyuan.db]
I 2024/03/25 11:06:59 conf.go:807: database size [4.1 kB], tree/block count [0/0]
I 2024/03/25 11:06:59 working.go:192: kernel booted
I 2024/03/25 11:06:59 box.go:76: auto stat [trees=0, blocks=0, dataSize=37 kB, assetsSize=0 B]
I 2024/03/25 11:06:59 disk.go:33: disk usage [total=999 GB, used=306 GB, free=693 GB]
I 2024/03/25 11:07:00 index.go:197: rebuilt database for notebook [20210808180117-6v0mkxr] in [0.01s], tree [count=66, size=1.2 MB]
I 2024/03/25 11:07:00 index.go:269: resolved refs [31] in [21ms]
I 2024/03/25 11:07:00 pandoc.go:155: initialized built-in pandoc [ver=3.1.1, bin=C:\Shina\Dev\temp\pandoc\bin\pandoc.exe]
I 2024/03/25 11:07:00 conf.go:1051: pandoc initialized, set pandoc bin to [C:\Shina\Dev\temp\pandoc\bin\pandoc.exe]
I 2024/03/25 11:07:07 index.go:197: rebuilt database for notebook [20240325110707-30xjuz0] in [0.00s], tree [count=0, size=0 B]
I 2024/03/25 11:07:07 index.go:269: resolved refs [31] in [20ms]
W 2024/03/25 11:07:08 blocktree.go:552: save block tree [size=633 kB] to [C:\Shina\Dev\temp\blocktree], elapsed [3.79s]
I 2024/03/25 11:27:10 conf.go:547: exiting kernel [force=false, execInstallPkg=0]
I 2024/03/25 11:27:13 conf.go:1041: closed user guide box [20210808180117-6v0mkxr]
I 2024/03/25 11:27:13 database.go:1244: closed database
W 2024/03/25 11:27:15 blocktree.go:552: save block tree [size=878 B] to [C:\Shina\Dev\temp\blocktree], elapsed [3.86s]
I 2024/03/25 11:27:15 conf.go:970: cleared workspace temp
I 2024/03/25 11:27:15 sync.go:712: sync websocket closed
I 2024/03/25 11:27:16 conf.go:615: exited kernel
I 2024/03/25 11:30:00 working.go:146: 
      ___                                   ___           ___           ___
     /  /\        ___           ___        /__/\         /  /\         /__/\
    /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
   /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
  /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
 /__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
 \  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
  \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
   \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
     /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
     \__\/                                 \__\/         \__\/         \__\/
I 2024/03/25 11:30:00 runtime.go:74: kernel is booting:
    * ver [3.0.4]
    * arch [amd64]
    * os [Microsoft Windows 11 IoT Enterprise]
    * pid [14728]
    * runtime mode [prod]
    * working directory [C:\Users\Administrator\AppData\Local\Programs\SiYuan\resources]
    * read only [false]
    * container [std]
    * database [ver=20220501]
    * workspace directory [C:\Shina\Dev]
I 2024/03/25 11:30:00 runtime.go:123: use network proxy [system]
I 2024/03/25 11:30:00 serve.go:115: kernel [pid=14728] http server [127.0.0.1:63691] is booting
I 2024/03/25 11:30:00 blocktree.go:495: read block tree [878 B] to [C:\Shina\Dev\temp\blocktree], elapsed [0.00s]
I 2024/03/25 11:30:00 conf.go:807: database size [7.1 MB], tree/block count [1/3]
I 2024/03/25 11:30:00 working.go:192: kernel booted
I 2024/03/25 11:30:00 pandoc.go:132: built-in pandoc [ver=3.1.1, bin=C:\Shina\Dev\temp\pandoc\bin\pandoc.exe]
I 2024/03/25 11:30:00 conf.go:1051: pandoc initialized, set pandoc bin to [C:\Shina\Dev\temp\pandoc\bin\pandoc.exe]
I 2024/03/25 11:30:00 box.go:76: auto stat [trees=1, blocks=3, dataSize=78 kB, assetsSize=0 B]
I 2024/03/25 11:30:00 disk.go:33: disk usage [total=999 GB, used=307 GB, free=693 GB]
I 2024/03/25 11:34:54 conf.go:547: exiting kernel [force=false, execInstallPkg=0]
I 2024/03/25 11:34:54 database.go:1244: closed database
I 2024/03/25 11:34:54 conf.go:970: cleared workspace temp
I 2024/03/25 11:34:55 sync.go:712: sync websocket closed
I 2024/03/25 11:50:14 working.go:146: 
      ___                                   ___           ___           ___
     /  /\        ___           ___        /__/\         /  /\         /__/\
    /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
   /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
  /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
 /__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
 \  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
  \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
   \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
     /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
     \__\/                                 \__\/         \__\/         \__\/
I 2024/03/25 11:50:14 runtime.go:74: kernel is booting:
    * ver [3.0.4]
    * arch [amd64]
    * os [Microsoft Windows 11 IoT Enterprise]
    * pid [7928]
    * runtime mode [prod]
    * working directory [C:\Users\Administrator\AppData\Local\Programs\SiYuan\resources]
    * read only [false]
    * container [std]
    * database [ver=20220501]
    * workspace directory [C:\Shina\Dev]
I 2024/03/25 11:50:14 runtime.go:123: use network proxy [system]
I 2024/03/25 11:50:14 serve.go:115: kernel [pid=7928] http server [127.0.0.1:63780] is booting
I 2024/03/25 11:50:14 blocktree.go:495: read block tree [878 B] to [C:\Shina\Dev\temp\blocktree], elapsed [0.00s]
I 2024/03/25 11:50:14 conf.go:807: database size [7.1 MB], tree/block count [1/3]
I 2024/03/25 11:50:14 working.go:192: kernel booted
I 2024/03/25 11:50:14 pandoc.go:132: built-in pandoc [ver=3.1.1, bin=C:\Shina\Dev\temp\pandoc\bin\pandoc.exe]
I 2024/03/25 11:50:14 conf.go:1051: pandoc initialized, set pandoc bin to [C:\Shina\Dev\temp\pandoc\bin\pandoc.exe]
I 2024/03/25 11:50:14 box.go:76: auto stat [trees=1, blocks=3, dataSize=77 kB, assetsSize=0 B]
I 2024/03/25 11:50:14 disk.go:33: disk usage [total=999 GB, used=307 GB, free=693 GB]
I 2024/03/25 11:50:15 serve.go:128: reverse proxy server [127.0.0.1:6806] is booting
I 2024/03/25 11:53:19 conf.go:547: exiting kernel [force=false, execInstallPkg=0]
I 2024/03/25 11:53:19 database.go:1244: closed database
I 2024/03/25 11:53:19 conf.go:970: cleared workspace temp
I 2024/03/25 11:53:20 sync.go:712: sync websocket closed
I 2024/03/25 11:54:15 working.go:146: 
      ___                                   ___           ___           ___
     /  /\        ___           ___        /__/\         /  /\         /__/\
    /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
   /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
  /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
 /__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
 \  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
  \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
   \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
     /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
     \__\/                                 \__\/         \__\/         \__\/
I 2024/03/25 11:54:15 runtime.go:74: kernel is booting:
    * ver [3.0.4]
    * arch [amd64]
    * os [Microsoft Windows 11 IoT Enterprise]
    * pid [14756]
    * runtime mode [prod]
    * working directory [C:\Users\Administrator\AppData\Local\Programs\SiYuan\resources]
    * read only [false]
    * container [std]
    * database [ver=20220501]
    * workspace directory [C:\Shina\Dev]
I 2024/03/25 11:54:15 runtime.go:123: use network proxy [system]
I 2024/03/25 11:54:15 serve.go:115: kernel [pid=14756] http server [127.0.0.1:63841] is booting
I 2024/03/25 11:54:15 blocktree.go:495: read block tree [878 B] to [C:\Shina\Dev\temp\blocktree], elapsed [0.01s]
I 2024/03/25 11:54:15 conf.go:807: database size [7.1 MB], tree/block count [1/3]
I 2024/03/25 11:54:15 working.go:192: kernel booted
I 2024/03/25 11:54:15 pandoc.go:132: built-in pandoc [ver=3.1.1, bin=C:\Shina\Dev\temp\pandoc\bin\pandoc.exe]
I 2024/03/25 11:54:15 conf.go:1051: pandoc initialized, set pandoc bin to [C:\Shina\Dev\temp\pandoc\bin\pandoc.exe]
I 2024/03/25 11:54:15 box.go:76: auto stat [trees=1, blocks=3, dataSize=78 kB, assetsSize=0 B]
I 2024/03/25 11:54:15 disk.go:33: disk usage [total=999 GB, used=307 GB, free=692 GB]
I 2024/03/25 11:54:16 serve.go:128: reverse proxy server [127.0.0.1:6806] is booting
I 2024/03/25 12:00:14 conf.go:547: exiting kernel [force=false, execInstallPkg=0]
I 2024/03/25 12:00:14 database.go:1244: closed database
I 2024/03/25 12:00:14 conf.go:970: cleared workspace temp
I 2024/03/25 12:00:15 sync.go:712: sync websocket closed
I 2024/03/25 12:01:14 working.go:146: 
      ___                                   ___           ___           ___
     /  /\        ___           ___        /__/\         /  /\         /__/\
    /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
   /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
  /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
 /__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
 \  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
  \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
   \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
     /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
     \__\/                                 \__\/         \__\/         \__\/
I 2024/03/25 12:01:14 runtime.go:74: kernel is booting:
    * ver [3.0.4]
    * arch [amd64]
    * os [Microsoft Windows 11 IoT Enterprise]
    * pid [15868]
    * runtime mode [prod]
    * working directory [C:\Users\Administrator\AppData\Local\Programs\SiYuan\resources]
    * read only [false]
    * container [std]
    * database [ver=20220501]
    * workspace directory [C:\Shina\Dev]
I 2024/03/25 12:01:14 runtime.go:123: use network proxy [system]
I 2024/03/25 12:01:14 serve.go:115: kernel [pid=15868] http server [127.0.0.1:63921] is booting
I 2024/03/25 12:01:14 blocktree.go:495: read block tree [878 B] to [C:\Shina\Dev\temp\blocktree], elapsed [0.00s]
I 2024/03/25 12:01:14 conf.go:807: database size [7.1 MB], tree/block count [1/3]
I 2024/03/25 12:01:14 working.go:192: kernel booted
I 2024/03/25 12:01:14 pandoc.go:132: built-in pandoc [ver=3.1.1, bin=C:\Shina\Dev\temp\pandoc\bin\pandoc.exe]
I 2024/03/25 12:01:14 conf.go:1051: pandoc initialized, set pandoc bin to [C:\Shina\Dev\temp\pandoc\bin\pandoc.exe]
I 2024/03/25 12:01:14 box.go:76: auto stat [trees=1, blocks=3, dataSize=82 kB, assetsSize=0 B]
I 2024/03/25 12:01:14 disk.go:33: disk usage [total=999 GB, used=307 GB, free=692 GB]
I 2024/03/25 12:01:15 serve.go:128: reverse proxy server [127.0.0.1:6806] is booting
W 2024/03/25 12:01:20 index_fix.go:395: tree [20240325110710-umqymhj] is not up to date, reindex it
I 2024/03/25 12:19:09 conf.go:547: exiting kernel [force=false, execInstallPkg=0]
I 2024/03/25 12:19:09 database.go:1244: closed database
I 2024/03/25 12:19:09 conf.go:970: cleared workspace temp
I 2024/03/25 12:19:10 sync.go:712: sync websocket closed

More information

No response

@TCOTC
Copy link
Contributor

TCOTC commented Mar 25, 2024

不是添加行太快导致的。输入主键后点击任意位置,光标都会回到数据库标题。

@Shina-SG
Copy link
Author

SiYuan_NzIihHz0y6.mp4

Here's another example of when I'm doing it slow and doing it fast

这是另一个我做得慢和快的例子 Here's another example of me doing it slow and fast

@TCOTC
Copy link
Contributor

TCOTC commented Mar 26, 2024

@Vanessa219 我觉得光标不应该回到数据库标题

@TCOTC
Copy link
Contributor

TCOTC commented Mar 26, 2024

还有个新情况,光标显示在标题上,但 Backspace 会把我选中的主键删除:

image

@Vanessa219
Copy link
Member

还有个新情况,光标显示在标题上,但 Backspace 会把我选中的主键删除:

image

单元格被选中时优先单元格

@Vanessa219 Vanessa219 modified the milestones: backlog, 3.0.6 Mar 28, 2024
@Vanessa219 Vanessa219 modified the milestones: 3.0.6, 3.0.7 Apr 1, 2024
@88250 88250 modified the milestones: 3.0.7, 3.0.8 Apr 2, 2024
@88250 88250 changed the title When creating too fast the cursor is at the Database name rather than the new row name When creating too fast the cursor is at the database name rather than the new row name Apr 4, 2024
@88250 88250 changed the title When creating too fast the cursor is at the database name rather than the new row name Database cursor focus is automatically reset to the title input Apr 4, 2024
@TCOTC
Copy link
Contributor

TCOTC commented Apr 4, 2024

总之,如果用户没有点击标题,光标就不应该跑到标题上去

@88250
Copy link
Member

88250 commented Apr 5, 2024

嗯,我也觉得。

@88250 88250 changed the title Database cursor focus is automatically reset to the title input Database cursor focus is no longer automatically reset to the title input Apr 7, 2024
@88250 88250 modified the milestones: 3.0.8, 3.0.9 Apr 7, 2024
@Vanessa219 Vanessa219 modified the milestones: 3.0.9, 3.1.0, 3.0.10 Apr 10, 2024
Vanessa219 added a commit that referenced this issue Apr 12, 2024
@TCOTC
Copy link
Contributor

TCOTC commented Apr 13, 2024

@Vanessa219 新建数据库的时候,光标应该在数据库标题上

@TCOTC
Copy link
Contributor

TCOTC commented Apr 14, 2024

新建数据库的时候,光标应该在数据库标题上

@Vanessa219 否则会导致这个问题:

数据库

Vanessa219 added a commit that referenced this issue Apr 15, 2024
Vanessa219 added a commit that referenced this issue Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants