Cannot click 2nd level checkbox

Bug report

Hello there,

I noticed that I cannot click nested checkboxes within the editor while the cursor is in the checkbox like:

* [ ] Level 1
  * [ ] Level 2

Level 2 in this case is not clickable.

Environment

  • Platform: macOS 14.5
  • App Version: 5.8.1

Hi Marco,

Thanks for the report.
You are right - I found and fixed this bug while working on the new web app for sharing notes. This was due to the nested <label> HTML tags.
So, it will be automatically solved in the new version!

1 Like

It doesn’t seem to be fixed in Version 5.9.0-beta.0 (5.9.0-beta.0), just to let you know :v:

Thanks for letting me know! For some reason, this fix wasn’t included in the macOS build :joy: Maybe the webpack’s build cache or something. It will be landed in the beta-1!

oh wait…it works as expected in beta.0. Now, I can’t reproduce it :thinking:

Perhaps it doesn’t happen in newly created notes but still could be an issue in the old note where I initially had / have the issue?

In a new note it also works as intended.

No, the app doesn’t cache render results. Let me know if you found how to reproduce it!

With this markdown I can’t check the level 2 boxes in edit mode:

### TODO

* [x] 	very important information was here
  * [ ] 	test
  * [ ] 	  → redirect zu Start  
* [ ] 	new checkbox
* [ ] 		weder noch raus
* [ ] 	I deleted this text
1 Like

looks like a copy and paste thing because there is a tab in the level 2 checkboxes after the [ ]

This steals the focus from the clickable checkbox.

when .cm-url, .cm-formatting-task are relatively positioned it should solve this

Gotcha! I think I managed to fix it.
It was due to an invalid dependency for the useCallback in the checkbox component on the preview. That’s why it randomly happens.
I’ll let you know when the next beta build is out.

1 Like

@Marco_Laux Can you try v5.9.0-beta.1 ?

In some variants, clicking on the checkbox still does not work.

- [ ] test 1
- [ ] test 1.1
- [ ] test 1.2

* * *

- [ ] test 2
- [ ] test 2.1
- [ ] test 2.2

@dgavrilov Hmm, can’t reproduce it in v5.9.0-beta.1.
Does it always happen?

Yes, reproduced in some specific cases. For example, I’ve now pasted my text above and everything displays fine. But if I insert another empty line after the horizontal line, the bug is reproduced again.

It is still an issue in the editor view.

* [x] 	test1
  * [ ] 	test
  * [ ] 	  → some test  
* [ ] 	test2

I’m not able to click the 2nd level items below test1.

I copied the code block above from discourse here into a new note and can reproduce the issue this way, too.

Still can’t reproduce it.
When the issue happens, the line numbers of the task items should be wrong.
For example, a task item at line 6 should have the attribute line-start="6" in the preview:

What does it look like on your side?

Yes, the line numbers and line-start attribute numbers are the same.

ohh really? So, the issue can happen when the line-start attributes are correct :thinking:
Have you tried disabling third-party plugins?

With all plugins disabled, the same behavior. I also noticed this specific thing: if switch to another note without checkboxes and switch back, everything starts working correctly.