IE mouse event and mouse capture fixes
This commit is contained in:
parent
96e1618ec1
commit
7869795a1d
4 changed files with 74 additions and 46 deletions
|
|
@ -13,7 +13,7 @@ ace.mixin(ace.TextDocument.prototype, ace.MEventEmitter);
|
|||
|
||||
|
||||
ace.TextDocument.prototype._split = function(text) {
|
||||
return text.split(/[\n\r]/);
|
||||
return text.split(/\r\n|\r|\n/);
|
||||
};
|
||||
|
||||
ace.TextDocument.prototype.toString = function() {
|
||||
|
|
@ -212,7 +212,7 @@ ace.TextDocument.prototype._insert = function(position, text) {
|
|||
|
||||
var newLines = this._split(text);
|
||||
|
||||
if (text == "\n") {
|
||||
if (this._isNewLine(text)) {
|
||||
var line = this.lines[position.row] || "";
|
||||
this.lines[position.row] = line.substring(0, position.column);
|
||||
this.lines.splice(position.row + 1, 0, line.substring(position.column));
|
||||
|
|
@ -251,6 +251,10 @@ ace.TextDocument.prototype._insert = function(position, text) {
|
|||
}
|
||||
};
|
||||
|
||||
ace.TextDocument.prototype._isNewLine = function(text) {
|
||||
return (text == "\r\n" || text == "\r" || text == "\n");
|
||||
};
|
||||
|
||||
ace.TextDocument.prototype.remove = function(range) {
|
||||
this._remove(range);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue