Skip to content

Commit a4c03be

Browse files
VdustRmarcosmoura
authored andcommitted
fix: menu compatibility with IE (node type statement) (vuematerial#1365)
* fix: compare node by type dom constructors do not have name property in IE. replace that with comparing by their node type. fix vuematerial#1263 * fix(MdMenuContent): height for IE got height `0` with style `flex-direction: column` fix vuematerial#1263
1 parent fe1ec4a commit a4c03be

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/components/MdMenu/MdMenuContent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
max-width: $md-menu-base-width * 5;
249249
max-height: 35vh;
250250
display: flex;
251-
flex-direction: column;
251+
flex-direction: row;
252252
position: absolute;
253253
z-index: 60;
254254
border-radius: 2px;

src/components/MdPopover/MdPopover.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
if (this.mdSettings) {
9292
const options = deepmerge(this.getPopperOptions(), this.mdSettings)
9393
94-
if (this.$el.constructor.name.toLowerCase() !== 'comment') {
94+
if (this.$el.nodeType !== Node.COMMENT_NODE) {
9595
this.popperInstance = new Popper(this.originalParentEl, this.$el, options)
9696
}
9797
}

src/components/MdPortal/MdPortal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default {
9898
async initDestroy (manualCall) {
9999
let el = this.$el
100100

101-
if (manualCall && this.$el.constructor.name.toLowerCase() === 'comment') {
101+
if (manualCall && this.$el.nodeType === Node.COMMENT_NODE) {
102102
el = this.$vnode.elm
103103
}
104104

0 commit comments

Comments
 (0)