Skip to content

jQuery.fn.offset() requires a valid DOM element #88

@Daijobou

Description

@Daijobou

Line https://github.com/PitPik/tinyColorPicker/blob/master/jqColorPicker.js#L306 call function toggle() without a DOM element, but in toggle() you catch always $this.offset() of $this = $(this) which not exists. Line https://github.com/PitPik/tinyColorPicker/blob/master/jqColorPicker.js#L83

You get this, when you close a tinycolorpicker popup with click on the website.

maybe change line 83 to position = $this.length ? $this.offset() : null, could be a solution or put var position in if (event) block, there you only need it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions