quickadd icon indicating copy to clipboard operation
quickadd copied to clipboard

[BUG] "Insert at end of section" option in Capture event is disregarded.

Open BugCatcher91 opened this issue 1 year ago • 0 comments

Describe the bug "Insert at end of section" option in Capture event is ignored when the specified heading also contains sub-sections.

To Reproduce Steps to reproduce the behavior (Source mode and line numbers enabled for visibility):

  1. Create a new note file with 1 heading titled H1 and a sub-heading labelled H2. image
  2. Create a new QuickAdd Capture titled "End of H1" with settings as shown. image image
  3. Run QuickAdd: "End of H1" from the Command Palette and enter value "1" in the prompt modal. image image
  4. Note "1" is inserted at the end of sub-section H2 (rather than H1). image
  5. Run QuickAdd: "End of H1" again from the Command Palette and enter value "2" in the prompt modal. image
  6. Note that the second value entered ("2") is placed above the first value ("1") in sub-section H2, rather than at the end of section H1. image

Extra weird behavior: the presence of properties will change the above outcome.

  1. Repeat steps 1-6 on new note file which has properties (i.e. "tags" field).
  2. Note the entered values now are correctly placed in section H1, although the are still incorrectly placed at the start of the section, rather than the end (evidenced by "2" appearing above "1"). image

Expected behavior Entered values should be placed at the end of the specified section (i.e. H1) and ultimately appear in the same order as they were entered (i.e. 1 followed by 2), as shown:

Without properties image

With properties image

Screenshots See above.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • QuickAdd Version 1.8.1
  • Obsidian 1.5.12

Smartphone (please complete the following information):

  • Device: Samsung Galaxy A20
  • OS: Android 11
  • Browser Firefox
  • QuickAdd Version 1.8.1
  • Obsidian 1.5.12

Additional context If my interpretation of sections is incorrect, it might be worth specifying the difference between Headings and Sections within the QuickAdd UI.

BugCatcher91 avatar Apr 29 '24 02:04 BugCatcher91