Skip to content

The event object is not passed to the handler #22

Description

@ruslansagitov

Regression after 206bbf8. In this commit, the following code was added:

if ( elem[ type ] ) {
    elem[ type ]();
} else …

But in this code, the event object is not passed to the handler! It leads to lots of bugs, for example, inability to use options for the click event:

$('button').simulate('click', { button: 2 }); /* right mouse button */

It has bad influence on the focus (and hence focusin and focusout) event as well.

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