Skip to content

Improve floating editor content synchronization #14326

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

Closed
TCOTC opened this issue Mar 9, 2025 · 25 comments
Closed

Improve floating editor content synchronization #14326

TCOTC opened this issue Mar 9, 2025 · 25 comments
Assignees
Milestone

Comments

@TCOTC
Copy link
Contributor

TCOTC commented Mar 9, 2025

浮窗编辑器不正常同步,发生运行时错误

video.webm
@88250 88250 assigned 88250 and Vanessa219 and unassigned 88250 Mar 10, 2025
Vanessa219 added a commit that referenced this issue Mar 13, 2025
@Vanessa219 Vanessa219 added this to the 3.1.25 milestone Mar 13, 2025
@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 13, 2025

嵌入块有点问题:

video.webm

Vanessa219 added a commit that referenced this issue Mar 13, 2025
@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 13, 2025

撤回之后不一致的问题没解决:

Image

@88250 88250 changed the title 浮窗编辑器不正常同步,发生运行时错误 Improve floating editor content synchronization Mar 13, 2025
@Vanessa219
Copy link
Member

是这样操作么,看上去是正常的。

Jietu20250314-104749-HD.mp4

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 14, 2025

多按一次回车去掉列表项,然后 Ctrl+Z 恢复列表项

@Vanessa219
Copy link
Member

还是不能重现

Jietu20250314-163041-HD.mp4

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 14, 2025

哦我记错了,是反缩进 Shift+Tab

@Vanessa219
Copy link
Member

Vanessa219 commented Mar 15, 2025

去除列表后无法反向缩进了,要不录一个重现的视频我跟着操作一下吧。

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 15, 2025

录屏就是前面那个:

Image

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 16, 2025

@Vanessa219

01

这样操作之后浮窗和页签会产生不一致:

video.webm

02

反链面板也有类似的问题:

video.webm

Vanessa219 added a commit that referenced this issue Mar 17, 2025
@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 18, 2025

@Vanessa219 浮窗的问题 01 依然存在,并且反链的问题 02 的症状也变成跟问题 01 一样了

EightDoor added a commit to EightDoor/siyuan that referenced this issue Mar 19, 2025
* commit '0b0c27b0bad3e2a073f61ed28c6ce76d2f2b4b07': (139 commits)
  🔖 Release v3.1.25
  🎨 siyuan-note#14380
  🎨 siyuan-note#14380
  📝 Update changelogs
  🎨 Improve HTML clipping siyuan-note#14386
  🎨 Supports assets settings on mobile siyuan-note#13930 siyuan-note#13622 (siyuan-note#14380)
  🎨 siyuan-note#14326   #issuecomment-2727527008
  🎨 siyuan-note#14370
  🎨 siyuan-note#14370
  🎨 siyuan-note#14309
  🎨 siyuan-note#13940
  ⬆️ Upgrade deps
  🎨 siyuan-note#14370
  📝 Update changelogs
  🎨 siyuan-note#14377
  🎨 siyuan-note#14370
  📝 Update changelogs
  🎨 Improve query embed block auto refresh siyuan-note#14370
  🎨 When deleting a referenced definition block, a pop-up window will prompt the user siyuan-note#13396
  🎨 siyuan-note#14370
  ...
@Vanessa219
Copy link
Member

@88250 windows 上验证一下,我这里重现不了

@88250
Copy link
Member

88250 commented Mar 19, 2025

我这里也重现不了:

issue.webm

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 19, 2025

怎么我这里又不一样,下一个dev版我再试试吧

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 20, 2025

dev1 还是有问题

Image

@Vanessa219
Copy link
Member

新建一个工作空间也有没?

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 20, 2025

也会

@Vanessa219
Copy link
Member

问题我和 D 新建工作空间都重现不了,版本对么?

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 21, 2025

版本是对的,很怪

@Vanessa219
Copy link
Member

Jietu20250322-112400-HD.mp4.zip

我录屏给你看看,是不是哪里操作不对

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 22, 2025

这一步先在浮窗里反缩进 3,然后在页签里缩进回来:

Image

@Vanessa219
Copy link
Member

操作步骤:
浮窗 3 反向缩进
编辑器 3 缩进

Vanessa219 added a commit that referenced this issue Mar 23, 2025
@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 23, 2025

多选块的时候还是有问题:

video.webm

Vanessa219 added a commit that referenced this issue Mar 24, 2025
@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 24, 2025

Image

@Vanessa219 这个写法看起来好奇怪,用 while 循环会不会更好?

while (protyle.wysiwyg.element.childElementCount > 1) {
    protyle.wysiwyg.element.lastElementChild.remove();
}

@Vanessa219
Copy link
Member

Vanessa219 commented Mar 24, 2025

这样每次都要计算

@TCOTC
Copy link
Contributor Author

TCOTC commented Mar 24, 2025

for 循环也是每次都要算吧,childElementCount 每次会减 1

EightDoor added a commit to EightDoor/siyuan that referenced this issue Mar 25, 2025
* commit '1317020c1791edf440da7f836d366567e03dd843': (65 commits)
  🔖 Release v3.1.26
  🎨 Add index `idx_attributes_block_id` https://ld246.com/article/1742827508465
  📝 Supports append text by shortcuts to the dailynote doc on Android siyuan-note#14414
  🎨 Support in-app purchase PRO Features and Subscription on iOS siyuan-note#14159
  📝 Supports append text by shortcuts to the dailynote doc on Android siyuan-note#14414
  🎨
  📝 Update changelogs
  🎨 siyuan-note#14372
  🎨 siyuan-note#14364
  🎨 siyuan-note#14405
  🐛 siyuan-note#14326
  🎨 siyuan-note#14326
  🎨 siyuan-note#14156
  ⬆️ Upgrade lute siyuan-note#14397
  ⬆️ Upgrade lute siyuan-note#14424
  🎨 siyuan-note#14395
  🎨 siyuan-note#14406
  🎨 siyuan-note#14428
  ⬆️ Upgrade lute siyuan-note#14424
  🎨 Support indented code block syntax when importing Markdown siyuan-note#14429
  ...
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

3 participants