Element: [Bug Report] Poppover popper-options causes error

Created on 23 Aug 2017  ·  6Comments  ·  Source: ElemeFE/element

Element UI version

1.4.2

OS/Browsers version

OSX Chrome, OSX Safari

Vue version

2.4.2

Reproduction Link

https://jsfiddle.net/sammie/ondno3oe/

Steps to reproduce

Bind an object to popper-options declaring modifiers in the format specified by https://popper.js.org/popper-documentation.html#Popper.Defaults

What is Expected?

Popover appears with offset specified by popper-options

What is actually happening?

Popover appears at bottom: 0, left: 0.
Javascript error: TypeError: this._options.modifiers.map is not a function

popover stale

All 6 comments

The solution was to refactor popper.js as a package dependency instead of relying on an internal, out-of-date popper.js file in src/utils. Then I had to refactor Vue-popper to reference vm.PopperJS.popper instead of vm.PopperJS._popper.

This required the popper.js to be imported as an es6 native module instead of a commonjs require() module, so its unclear how this might effect server-side rendering (not a feature I happen to care about).

My solution can be found in a fork here, with an example of popover's popper-options in updated documentation: https://github.com/sammieedwards/element

+1. I have the same issue. Refactoring dependency code isn't really an option for me.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Is there a fix for this issue?

这个问题有没有解决啊

Could this please be addressed? I can confirm the bug and the solution by @stablegeniusbestbrain works like a charm and looks clean, but obviously I don't want to edit files in my node_modules folder.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yorululu picture yorululu  ·  3Comments

chao-hua picture chao-hua  ·  3Comments

EdenSpark picture EdenSpark  ·  3Comments

smallpath picture smallpath  ·  3Comments

akaylh picture akaylh  ·  3Comments