garysieling / garysieling/jquery-highlighttextarea
IE not synchronizing scroll from input ScrollLeft to Highlight Area in INPUT tags
- Dominant language
- JavaScript
- Stars
- 157
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
My code is as follows. As simple as this:
``` javascript
(function($) {
$(document).ready(function() {
$("#e5")
.highlightTextarea({
caseSensitive: false,
words: ['test']
});
});
}(jQuery));
```
``` html
```
The outcome is like this:

Then if I move to the right of my input, the highlighter component is expected to move as well but it doesn't.

The inner left css is always **0** for the hightlighter div. Debugging the code I have found that in IE only the function **Highlighter.prototype.updateSizePosition** in the following section:
``` javascript
this.$highlighter.css({
'width': width,
'height': this.$el.height() + this.$el.scrollTop(),
'top': -this.$el.scrollTop(),
'left': -this.$el.scrollLeft()
});
```
uses the sentence **this.$el.scrollLeft()**. This is ALWAYS 0. I haven't found anything on the internet about this issue with IE. Could you please help out?
By te way, I am using jquery-2.1.1.js and I changed the css for the highlighted test as part of my debug to find out the problem. I just removed the color:transparent sentence from .highlightTextarea .highlighter.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.