diff --git a/src/editable-form/editable-form.css b/src/editable-form/editable-form.css index 9b31e46..bb7e70b 100644 --- a/src/editable-form/editable-form.css +++ b/src/editable-form/editable-form.css @@ -113,7 +113,11 @@ position: absolute; opacity: 0.6; z-index: 100; - + + top: 50%; + right: 5px; + margin-top: -7px; + } .editable-clear-x:hover { diff --git a/src/inputs/html5types.js b/src/inputs/html5types.js index 2a47b97..3ec5353 100644 --- a/src/inputs/html5types.js +++ b/src/inputs/html5types.js @@ -136,16 +136,16 @@ Number }, postrender: function() { if(this.$clear) { + //increase right ffset for up/down arrows + this.$clear.css({right: 24}); + /* //can position clear button only here, when form is shown and height can be calculated - var h = this.$input.outerHeight() || 20, + var h = this.$input.outerHeight(true) || 20, delta = (h - this.$clear.height()) / 2; - //workaround for plain-popup - if(delta < 3) { - delta = 3; - } //add 12px to offset right for up/down arrows - this.$clear.css({bottom: delta, right: delta + 12}); + this.$clear.css({top: delta, right: delta + 16}); + */ } } }); diff --git a/src/inputs/text.js b/src/inputs/text.js index 647e9ca..a0fbcef 100644 --- a/src/inputs/text.js +++ b/src/inputs/text.js @@ -67,18 +67,17 @@ $(function(){ }, postrender: function() { + /* + //now `clear` is positioned via css if(this.$clear) { //can position clear button only here, when form is shown and height can be calculated - var h = this.$input.outerHeight() || 20, +// var h = this.$input.outerHeight(true) || 20, + var h = this.$clear.parent().height(), delta = (h - this.$clear.height()) / 2; - - //workaround for plain-popup - if(delta < 3) { - delta = 3; - } - this.$clear.css({bottom: delta, right: delta}); - } + //this.$clear.css({bottom: delta, right: delta}); + } + */ }, //show / hide clear button