Skip to content

Error occur when clicking svg tags #38

Closed
@suntt2019

Description

@suntt2019

The error output is:

TypeError: resizer.className.match is not a function
   at VueComponent.onMouseDown (multipane.js?77e5:41)

The error happens in this line:

if (resizer.className && resizer.className.match('multipane-resizer')) {

The resizer.className here is expected to be a string, however, when click a svg tag, the classname returned is a SVGAnimatedString object. SVGAnimatedString objects don't implement the match method, so a error is thrown.

To fix this bug, a simple way is changing resizer.className into (resizer.className + ""), this will turn the SVGAnimatedString objects into null, and no error occurs in my environment.

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