Closed robertdaleg closed 1 week ago
I have the same, same steps to reproduce, just installed the plugin and discovered the issue.
I am having the same issue, is there a workaround in the meantime?
This is because live preview and read mode go through two different render paths. This cannot be fixed, sorry.
Check for existing bug reports before submitting.
Expected Behavior
In a document, when I add a formula like
dice: 2d20
and see a result of "2d20 -> [3, 15] -> 18", and then toggle the editor to read only mode, the results should remain the same.Also, when logging results to the dice tray, that logging should happen when the editor is in edit mode.
Current behaviour
When I put in a formula in a document, like
dice 1d20
and then toggle between read-only and live preview edit modes, I get different results. The results stay the same (every time I enter read mode, I see "2d20 -> [4, 17] => 21", and every time I toggle to edit mode, it displays a different result, but that result doesn't change if I toggle to read mode and back to edit, so it always shows "2d20 -> [12, 1] -> 13" until I click the dice icon to reroll. It's like there is a separate result for live preview edit mode and read only mode.When I log the results to the dice tray, it only logs when I click the icon in Read mode, but those logged results do agree with what I see in the document. When in edit mode, rolls don't get logged at all, and they're a distinct result from the Read mode results.
Reproduction
To reproduce, start a new vault, add the Dice Roller plugin, turn on the Dice Display "Display Formula with Results" and "Display Dice Button with Results" options. Turn on the Dice Rollers section's "Log Rolls to Dice Tray" option.
dice: 2d20
and click on the dice button. Note the dice tray does not log the result.Which Operating Systems are you using?
Obsidian Version Check
1.5.3
Plugin Version
10.4.4
Confirmation
Possible solution
No response