Skip to content

Unable to use with React components #29

@kdeloach

Description

@kdeloach

When this plugin is used within a React component, onClick events do not fire. Here is the line of code causing this problem:

this.$menuitems.on( 'click.dlmenu', function( event ) {

                event.stopPropagation();

Source: https://github.com/codrops/ResponsiveMultiLevelMenu/blob/master/js/jquery.dlmenu.js#L123

I suggest that stopPropagation should only be called when a submenu parent node is clicked, but not when normal links are clicked, to improve compatibility with React and other frameworks.

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