gurted icon indicating copy to clipboard operation
gurted copied to clipboard

[BUG] :append() merges elements.

Open MutantRabbit767 opened this issue 1 year ago • 0 comments

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:

  1. add an element with :append()
  2. add another element with :append() into the same div/container.
  3. 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.

Screenshots

Desktop (please complete the following information):

  • OS: Linux
  • Version 1.0.2

MutantRabbit767 avatar Sep 13 '25 06:09 MutantRabbit767