Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when pane contains svg #19

Open
maxvanceffer opened this issue Jul 11, 2018 · 7 comments
Open

Bug when pane contains svg #19

maxvanceffer opened this issue Jul 11, 2018 · 7 comments

Comments

@maxvanceffer
Copy link

I have highchart inside of pane, and when click on it, there error raised with text:
TypeError: t.className.match is not a function

because t is path element and it's className is array, and really array has no function match.

VueComponent.onMouseDown
vue-multipane/dist/vue-multipane.esm.js:3:560

@ulizko
Copy link

ulizko commented Sep 24, 2018

@maxvanceffer
I also had this error with svg files.
I just add to the "mousedown" event handler with the "stop" modifier

<div class="sort-icon" @mousedown.stop>
   <svg>...</svg>
</div>

@maxvanceffer
Copy link
Author

Thx... will try, this hack. But as i see, developers already have a pull request, which fix this error.

@maxvanceffer
Copy link
Author

#6

jhlee8804 pushed a commit to jhlee8804/vue-multipane that referenced this issue Mar 18, 2019
jhlee8804 pushed a commit to jhlee8804/vue-multipane that referenced this issue Mar 18, 2019
jhlee8804 referenced this issue in jhlee8804/vue-multipane Apr 1, 2019
…fix#19-yansern#15-yansern#14-yansern#7-yansern#17-yansern#1

* 'master' of https://github.com/vibou/vue-multipane:
  0.96
  fix issue with event names. Renamed: resize resizestart and resizestop since kebab case is not working either
  0.96
  0.96
  0.96
  Change version
  Change events name from camelcase to kebab-case

# Conflicts:
#	demo/main.js
#	dist/vue-multipane.esm.js
#	dist/vue-multipane.js
#	dist/vue-multipane.min.js
#	src/multipane.js
@francisashley
Copy link

francisashley commented Aug 14, 2021

Unfortunately it is not always possible to add @mousedown.stop above the svg.

Another solution would be to suppress the error in a component, page or layout file further up the component tree:

errorCaptured(error, vm, info) {
  if (error.message === 't.className.match is not a function') {
    return false // prevent the error from propagating
  }
}

@RobbeR
Copy link

RobbeR commented Aug 20, 2021

I have the same problem, and none of the solutions above helped. Any chance to fix this in the future? Thanks!

@lkjimy
Copy link

lkjimy commented Sep 4, 2021

Having the same issue here. I have another plugin inserting svgs on the page. Error appears when the svgs are clicked.

image
image

EDIT: The solution from #6 pull request worked for me.

@wangqh
Copy link

wangqh commented Oct 21, 2021

阻止冒泡虽然能解决问题,但不太优雅;
所以希望能从根儿上解决,如:if (typeof t.className === 'string' && t.className.match('multipane-resizer'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants