Skip to content

Commit

Permalink
Fix in page nav width bug
Browse files Browse the repository at this point in the history
Fix bug with long text in in-page nav items: the text flow outside the width
of the container when fixed position on wide screens. Fixed by copying the
width from the container.
  • Loading branch information
ediblecode committed Jul 25, 2017
1 parent 6fe4f2b commit 0233a5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/in-page-nav/in-page-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ export default class InPageNav {
// Move element to the target
this.$inpagenav.appendTo(this.$wideTarget);
}
this.$inpagenav.width(this.$wideTarget.width());
} else if(!this.$inpagenav.parent().is(this.$el)) {
this.$inpagenav.appendTo(this.$el);
this.$inpagenav.width("auto");
}
}

Expand Down

0 comments on commit 0233a5e

Please sign in to comment.