Skip to content

Commit

Permalink
fix tip position height
Browse files Browse the repository at this point in the history
  • Loading branch information
liyincheng committed Feb 24, 2016
1 parent 39be822 commit 136fcd4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion checkValidity.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ Form.prototype.addErrorMsg = function(input, msg, _maxWidth){
style += "left:" + (halfWidth*0.67 + position.left + marginLeft - 10) + "px;";
var marginTop = parseInt(inputStyle["marginTop"]);
marginTop = marginTop ? marginTop : 0;
style += "top:" + (position.top + 10 + $input.height() + marginTop) + "px";
var paddingTop = parseInt(inputStyle["paddingTop"]);
paddingTop = paddingTop ? paddingTop : 0;
style += "top:" + (position.top + 0 + $input.height() + marginTop + paddingTop * 2) + "px";
var errMsg = "<p class='" + errorMsgClass + "' style='" + style + "'><span style='max-width:" + (maxWidth - 25) + "px;'>" + msg + "</span></p>";
$(input.form).find("." + this.checkOpt.errorMsgClass).remove();
$(errMsg).insertAfter(input);
Expand Down

0 comments on commit 136fcd4

Please sign in to comment.