ensure highlighting div size always matches the relevant textarea

This commit is contained in:
Leo Hemsted
2020-03-05 15:44:31 +00:00
parent 4b95fecd4f
commit 1558d05be7
2 changed files with 24 additions and 7 deletions

View File

@@ -27,6 +27,8 @@
`))
.on("input", this.update);
$(window).on("resize", this.resize);
visibleTextbox = this.$textbox.clone().appendTo("body").css({
position: 'absolute',
visibility: 'hidden',
@@ -47,7 +49,7 @@
this.resize = () => {
this.$background.width(this.$textbox.outerWidth());
this.$background.width(this.$textbox.width());
this.$textbox.height(
Math.max(