Skip to content

Commit

Permalink
fix: menu compatibility with IE (node type statement) (#1365)
Browse files Browse the repository at this point in the history
* fix: compare node by type

dom constructors do not have name property in IE.
replace that with comparing by their node type.

fix #1263

* fix(MdMenuContent): height for IE

got height `0` with style `flex-direction: column`

fix #1263
  • Loading branch information
VdustR authored and marcosmoura committed Jan 3, 2018
1 parent fe1ec4a commit a4c03be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/MdMenu/MdMenuContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
max-width: $md-menu-base-width * 5;
max-height: 35vh;
display: flex;
flex-direction: column;
flex-direction: row;
position: absolute;
z-index: 60;
border-radius: 2px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/MdPopover/MdPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
if (this.mdSettings) {
const options = deepmerge(this.getPopperOptions(), this.mdSettings)
if (this.$el.constructor.name.toLowerCase() !== 'comment') {
if (this.$el.nodeType !== Node.COMMENT_NODE) {
this.popperInstance = new Popper(this.originalParentEl, this.$el, options)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MdPortal/MdPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default {
async initDestroy (manualCall) {
let el = this.$el

if (manualCall && this.$el.constructor.name.toLowerCase() === 'comment') {
if (manualCall && this.$el.nodeType === Node.COMMENT_NODE) {
el = this.$vnode.elm
}

Expand Down

0 comments on commit a4c03be

Please sign in to comment.