From 57ecb229d9e4f20ffaefd6f219f40f5734f62954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Fri, 30 Dec 2016 23:47:16 +0100 Subject: [PATCH] Use a more simple workaround for width calc rounding issues --- addon/components/paper-tab.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addon/components/paper-tab.js b/addon/components/paper-tab.js index 270e43a7d..a27f27498 100644 --- a/addon/components/paper-tab.js +++ b/addon/components/paper-tab.js @@ -90,7 +90,8 @@ export default Component.extend(RippleMixin, ProxiableMixin, ColorMixin, { let context = this; if (context.$().length) { let left = context.$()[0].offsetLeft + context.get('offsetLeft'); - let width = parseFloat(window.getComputedStyle(context.$()[0]).getPropertyValue('width')); + // add a pixel to avoid truncation due to fractional rounding + let width = context.$()[0].offsetWidth + 1; context.set('self.offsetLeft', left); context.set('self.offsetWidth', width); }