Skip to content

Edit comment bug: can not save empty comment #29986

Closed
@yp05327

Description

@yp05327

Description

  1. can not save empty comment
    I think we need to check oldContent == comment.Content instead of len(comment.Content) == 0
    and return an empty json, then check data.content === undefined in js.
    image

(the second one has been fixed)

  1. edit comment regression

Caused by #29843
after the edition you will see this strange code:
image
If I revert the changes from #29843, it works
Have no idea how to fix this, as lint not allow using append.
maybe other changes in #29843 will also have this issue?
the appended data will be text not DOM element.
image

Gitea Version

latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions