old versions of firefox throw if negative indexes for children is used
This commit is contained in:
parent
a230c15950
commit
11eba737d1
1 changed files with 7 additions and 7 deletions
|
|
@ -467,14 +467,14 @@ var VirtualRenderer = function(container, theme) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!gutterReady) {
|
if (!gutterReady) {
|
||||||
var ch = this.$gutterLayer.element.children
|
var lineEl, ch = this.$gutterLayer.element.children;
|
||||||
var oldEl = ch[this.$gutterLineHighlight - this.layerConfig.firstRow];
|
var index = this.$gutterLineHighlight - this.layerConfig.firstRow;
|
||||||
if (oldEl)
|
if (index >= 0 && (lineEl = ch[index]))
|
||||||
dom.removeCssClass(oldEl, "ace_gutter_active_line");
|
dom.removeCssClass(lineEl, "ace_gutter_active_line");
|
||||||
|
|
||||||
var newEl = ch[i - this.layerConfig.firstRow];
|
index = i - this.layerConfig.firstRow;
|
||||||
if (newEl)
|
if (index >= 0 && (lineEl = ch[index]))
|
||||||
dom.addCssClass(newEl, "ace_gutter_active_line");
|
dom.addCssClass(lineEl, "ace_gutter_active_line");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$gutterLayer.removeGutterDecoration(this.$gutterLineHighlight, "ace_gutter_active_line");
|
this.$gutterLayer.removeGutterDecoration(this.$gutterLineHighlight, "ace_gutter_active_line");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue