From 44af5b1e5e3d192e184994b92e6d3e460efd2789 Mon Sep 17 00:00:00 2001 From: Kyle Fang Date: Mon, 21 Apr 2014 17:07:02 +0800 Subject: [PATCH] Fix tokens drop to the next line --- dist/bootstrap-tokenfield.js | 2 +- js/bootstrap-tokenfield.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/bootstrap-tokenfield.js b/dist/bootstrap-tokenfield.js index 54ce8ea..dfeff3d 100644 --- a/dist/bootstrap-tokenfield.js +++ b/dist/bootstrap-tokenfield.js @@ -898,7 +898,7 @@ if (this.textDirection === 'rtl') { return this.$input.width( this.$input.offset().left + this.$input.outerWidth() - this.$wrapper.offset().left - parseInt(this.$wrapper.css('padding-left'), 10) - inputPadding - 1 ) } - this.$input.width( this.$wrapper.offset().left + this.$wrapper.width() + parseInt(this.$wrapper.css('padding-left'), 10) - this.$input.offset().left - inputPadding ) + this.$input.width( this.$wrapper.offset().left + this.$wrapper.width() + parseInt(this.$wrapper.css('padding-left'), 10) - this.$input.offset().left - inputPadding - 1 ) } } diff --git a/js/bootstrap-tokenfield.js b/js/bootstrap-tokenfield.js index 54ce8ea..dfeff3d 100644 --- a/js/bootstrap-tokenfield.js +++ b/js/bootstrap-tokenfield.js @@ -898,7 +898,7 @@ if (this.textDirection === 'rtl') { return this.$input.width( this.$input.offset().left + this.$input.outerWidth() - this.$wrapper.offset().left - parseInt(this.$wrapper.css('padding-left'), 10) - inputPadding - 1 ) } - this.$input.width( this.$wrapper.offset().left + this.$wrapper.width() + parseInt(this.$wrapper.css('padding-left'), 10) - this.$input.offset().left - inputPadding ) + this.$input.width( this.$wrapper.offset().left + this.$wrapper.width() + parseInt(this.$wrapper.css('padding-left'), 10) - this.$input.offset().left - inputPadding - 1 ) } }