From 732109889e3645f2a6e625d504a1ea6135fa35fa Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 7 Apr 2016 16:08:40 +0100 Subject: [PATCH] Make border width of field layers match textbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We put a border on text boxes that have errors. This means that they take up more space than the layers above them which don’t have borders. This makes the layers that highlight the fields in a template misalign. This commit adds a line to make the borders match, which fixes this. --- app/assets/javascripts/highlightTags.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/highlightTags.js b/app/assets/javascripts/highlightTags.js index f4022710c..8cbd18bfe 100644 --- a/app/assets/javascripts/highlightTags.js +++ b/app/assets/javascripts/highlightTags.js @@ -46,9 +46,10 @@ this.initialHeight = this.$textbox.height(); - this.$backgroundMaskForeground.width( - this.$textbox.width() - ); + this.$backgroundMaskForeground.css({ + 'width': this.$textbox.width(), + 'border-width': this.$textbox.css('border-width') + }); this.$textbox .trigger("input");