Skip to content

draggable is enumerated and not Boolean and eventhandler will change details tag's open attribute to false #649

Description

@lyg1949

Describe the Bug

when set draggable to "true", nue will set only draggable (no ="true"),

eventhandler(like onclick) will change details tag's open attribute to false

Environment

  • OS: Linux
  • Nuekit 2.0

code like below:

<!doctype dhtml>

<body>
  <main>
    <details>
      <summary>
          <span class="tree-item">dir1</span>
      </summary>
      <details>
          <summary draggable="true" :ondragstart="drag" :onclick="click">
              <span class="tree-item">file1</span>
          </summary>
      </details>
      
  </details>
  <details>
    <summary>
        <span class="tree-item">dir2</span>
    </summary>
    <details>
        <summary>
            <span class="tree-item">file2</span>
        </summary>
    </details>
    
</details>
  </main>

  <script>

async drag(e){
console.log("ondragstart")
}
async  click(e){
e.preventDefault();
console.log(e)
}
</script>

</body>

Metadata

Metadata

Assignees

No one assigned

    Labels

    nuekitRelated to nuekit package

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions