From 7e88fbe8b2ac2086430375f2c641b59ceebcc289 Mon Sep 17 00:00:00 2001 From: Nikolai Katkov Date: Wed, 27 Apr 2016 20:15:49 +0300 Subject: [PATCH] fix select dropdown width It was not the same as select when select itself had the floating-point width --- js/jcf.select.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/jcf.select.js b/js/jcf.select.js index f959496..5413830 100644 --- a/js/jcf.select.js +++ b/js/jcf.select.js @@ -306,7 +306,8 @@ jcf.addModule(function($, window) { }, repositionDropdown: function() { var selectOffset = this.fakeElement.offset(), - selectWidth = this.fakeElement.outerWidth(), + fakeElementBounds = this.fakeElement[0].getBoundingClientRect(), + selectWidth = fakeElementBounds.width || fakeElementBounds.right - fakeElementBounds.left, selectHeight = this.fakeElement.outerHeight(), dropHeight = this.dropdown.css('width', selectWidth).outerHeight(), winScrollTop = this.win.scrollTop(),