forked from 0x2620/oxjs
better width/height for textarea editables
This commit is contained in:
parent
1b42a4e7f1
commit
9419e3972e
2 changed files with 7 additions and 1 deletions
|
|
@ -192,7 +192,12 @@ Ox.Editable = function(options, self) {
|
|||
var height, width;
|
||||
self.$test.css({display: 'inline-block'});
|
||||
height = self.options.height || Ox.limit(self.$test.height(), self.minHeight, self.maxHeight);
|
||||
width = self.options.width || Ox.limit(self.$test.width(), self.minWidth, self.maxWidth);
|
||||
width = self.$test.width();
|
||||
//+Ox.UI.SCROLLBAR_SIZE to prevent scrollbar from showing up
|
||||
if (self.options.type == 'textarea') {
|
||||
width += Ox.UI.SCROLLBAR_SIZE;
|
||||
}
|
||||
width = self.options.width || Ox.limit(width, self.minWidth, self.maxWidth);
|
||||
self.$test.css({display: 'none'});
|
||||
self.$input.options({
|
||||
width: width,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue