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;
|
||||
|
||||
if (!gutterReady) {
|
||||
var ch = this.$gutterLayer.element.children
|
||||
var oldEl = ch[this.$gutterLineHighlight - this.layerConfig.firstRow];
|
||||
if (oldEl)
|
||||
dom.removeCssClass(oldEl, "ace_gutter_active_line");
|
||||
var lineEl, ch = this.$gutterLayer.element.children;
|
||||
var index = this.$gutterLineHighlight - this.layerConfig.firstRow;
|
||||
if (index >= 0 && (lineEl = ch[index]))
|
||||
dom.removeCssClass(lineEl, "ace_gutter_active_line");
|
||||
|
||||
var newEl = ch[i - this.layerConfig.firstRow];
|
||||
if (newEl)
|
||||
dom.addCssClass(newEl, "ace_gutter_active_line");
|
||||
index = i - this.layerConfig.firstRow;
|
||||
if (index >= 0 && (lineEl = ch[index]))
|
||||
dom.addCssClass(lineEl, "ace_gutter_active_line");
|
||||
}
|
||||
|
||||
this.$gutterLayer.removeGutterDecoration(this.$gutterLineHighlight, "ace_gutter_active_line");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue