Skip to content

Commit d02ff70

Browse files
Fixed jQuery 1.8.2 tags issue with width and height.
1 parent be6b000 commit d02ff70

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/js/textext.core.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -970,17 +970,19 @@
970970
input = self.input(),
971971
wrap = self.wrapElement(),
972972
container = wrap.parent(),
973-
width = self.originalWidth,
973+
width = self.originalWidth + 'px',
974974
height
975975
;
976976

977977
self.trigger(EVENT_PRE_INVALIDATE);
978978

979-
height = input.outerHeight();
979+
height = input.outerHeight() + 'px';
980980

981-
input.width(width);
982-
wrap.width(width).height(height);
983-
container.height(height);
981+
// using css() method instead of width() and height() here because they don't seem to do the right thing in jQuery 1.8.x
982+
// https://github.com/alexgorbatchev/jquery-textext/issues/74
983+
input.css({ 'width' : width });
984+
wrap.css({ 'width' : width, 'height' : height });
985+
container.css({ 'height' : height });
984986

985987
self.trigger(EVENT_POST_INVALIDATE);
986988
};

src/js/textext.plugin.tags.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@
184184
p.init = function(core)
185185
{
186186
this.baseInit(core, DEFAULT_OPTS);
187-
188187
var self = this,
189188
input = self.input(),
190189
container

0 commit comments

Comments
 (0)