gurted
gurted copied to clipboard
[BUG] :append() merges elements.
Describe the bug
Elements added with :append() have no context of other elements added with :append() and end up merging with each other.
To Reproduce Steps to reproduce the behavior:
- add an element with :append()
- add another element with :append() into the same div/container.
- notice the issues it has with merging.
Or code example:
<div id="messages-container" style="...">
<!-- content -->
</div>
local messageElement = gurt.create('p', { text = text, style="text-orange-500" })
local messagesDiv = gurt.select("#messages-container")
messagesDiv:append(messageElement)
Expected behavior upon running the above Lua code twice, two messages should appear separated since they are different elements.
Desktop (please complete the following information):
- OS: Linux
- Version 1.0.2