-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
md-menu "Unhandled promise rejection" within IE 11 (edge mode) #1263
Comments
This issue is also present in beta7 |
Its weird because https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase is supported in IE |
We need to check what was happened in IE because that value is not a |
Here is my build
Babel config
|
This issue is also present within when clicking the select input, the same error appears and no drop down options show. You can remove the error by wrapping
In another if(this.$el.constructor.name) But the drop downs still don't open |
I also have the same problem. It's because String constructor has no "name" property. Maybe it's because it's a native function. To reproduce simply write |
To workaround, just add this to your polyfills:
|
How would I add this to babel? |
What if compare the constructor directly? if (this.$el.constructor === Comment) {
this.popperInstance = new _popper2.default(this.originalParentEl, this.$el, options);
} |
Hi VdustR, Modified vue-material.js and added in your above code. It stopped the console error appearing when clicking on a select or menu, but not drop down or menu actually appears. With IE 11 in Edge mode, your above code also breaks it in other browsers |
I'm sorry, there is a typo if (this.$el.constructor !== Comment) { |
Modified it again, its working in non IE browsers, in IE there is no errors but still no popup. I can do a console.log within that if which triggers, so it must be another issue with IE, thats causing pop ups to not work. |
Similar to the dialog issue here
This allows the select to appear and function, although its poorly formatted without any scrollbar. |
Steps to reproduce
Have an md-menu anywhere on page, when clicking to open, the menu won't open and the console gives an error, works in other browsers
Which browser?
IE 11 running in edge mode
VueMaterial 1.0.0-beta-6
What is expected?
Menu should open
What is actually happening?
Menu items don't display, console shows error
Unhandled promise rejection TypeError: Unable to get property 'toLowerCase' of undefined or null reference
at _callee2$ (file:///C:/Users/benma/Desktop/vuematerial/my-project/dist/testmenu.js:22201:19)
Error appears in this section of code
createPopper: function () { var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() { var options; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: if (this.mdSettings) { options = (0, _deepmerge2.default)(this.getPopperOptions(), this.mdSettings); if (this.$el.constructor.name.toLowerCase() !== 'comment') { this.popperInstance = new _popper2.default(this.originalParentEl, this.$el, options); } } case 1: case 'end': return _context2.stop(); } } }, _callee2, this); })); }),
Specifically at
if (this.$el.constructor.name.toLowerCase() !== 'comment') { this.popperInstance = new _popper2.default(this.originalParentEl, this.$el, options); }
Reproduction Link
The text was updated successfully, but these errors were encountered: