Skip to content

Incorrect html5 polyfil support check #549

Closed
@mustanggb

Description

@mustanggb

There is a comment that says:

// if <command> or <menuitem> are not handled by the browser,
// or options was a bool true,
// initialize $.contextMenu for them

The code that is meant to check this is:
(!$.support.htmlCommand && !$.support.htmlMenuitem)

However this does not operate as described in the comment if one exists and the other doesn't, for example Firefox 54.0.1 has support for <menuitem>, but not for <command>.

The correct code should either be:
!($.support.htmlCommand && $.support.htmlMenuitem)
Or:
(!$.support.htmlCommand || !$.support.htmlMenuitem)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions