Remove method that maintain’s scroll parity

Since we don’t anticipate placeholder textboxes ever scrolling in the future,
this can be removed.
This commit is contained in:
Chris Hill-Scott
2016-03-18 09:16:59 +00:00
parent 0f3b0b38bc
commit 8f0dd98d13

View File

@@ -20,8 +20,7 @@
<div class="textbox-highlight-mask" aria-hidden="true" /> <div class="textbox-highlight-mask" aria-hidden="true" />
<div class="textbox-highlight-foreground" aria-hidden="true" /> <div class="textbox-highlight-foreground" aria-hidden="true" />
`)) `))
.on("input", this.update) .on("input", this.update);
.on("scroll", this.maintainScrollParity);
this.initialHeight = this.$textbox.height(); this.initialHeight = this.$textbox.height();
@@ -45,14 +44,10 @@
$('<div/>').text(this.$textbox.val()).html().replace( $('<div/>').text(this.$textbox.val()).html().replace(
tagPattern, match => `<span class='tag'>${match}</span>` tagPattern, match => `<span class='tag'>${match}</span>`
) )
) );
this.update = () => ( this.update = () => (
this.replacePlaceholders() && this.resize() this.replacePlaceholders() && this.resize()
)
this.maintainScrollParity = () => this.$backgroundMaskForeground.scrollTop(
this.$textbox.scrollTop()
); );
}; };