text: move right padding for clear to render, otherwise popup position wrong

This commit is contained in:
vitalets
2013-01-07 14:02:16 +04:00
parent 5ac48f3fd8
commit 2258124766

@ -43,8 +43,11 @@ $(function(){
renderClear: function() { renderClear: function() {
if (this.options.clear) { if (this.options.clear) {
this.$clear = $('<span class="editable-clear-x"></span>'); this.$clear = $('<span class="editable-clear-x"></span>');
this.$input.after(this.$clear).parent().css('position', 'relative'); this.$input.after(this.$clear)
this.$input.keyup($.proxy(this.toggleClear, this)); .css('padding-right', 25)
.keyup($.proxy(this.toggleClear, this))
.parent().css('position', 'relative');
this.$clear.click($.proxy(function(){ this.$clear.click($.proxy(function(){
this.$clear.hide(); this.$clear.hide();
this.$input.val('').focus(); this.$input.val('').focus();
@ -64,7 +67,6 @@ $(function(){
} }
this.$clear.css({top: delta, right: delta}); this.$clear.css({top: delta, right: delta});
this.$input.css('padding-right', this.$clear.width() + 2*delta - 3);
} }
}, },