Skip to content

node.trigger(:input) doesn't dispatch an input event #197

Description

@janko

From following the JavaScript code, I believe that node.trigger(:input) currently ends up calling this.dispatchEvent('input'). However, that isn't the correct way to dispatch this event, it should be this.dispatchEvent(new Event('input')).

That's presumably the reason why the Cuprite JavaScript class defines a special input() function, instead of calling trigger().

input(node) {
let event = document.createEvent("HTMLEvents");
event.initEvent("input", true, false);
node.dispatchEvent(event);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions