moving the textarea into view broke rendering
This commit is contained in:
parent
07fc782ddb
commit
d2f0bebf42
6 changed files with 20 additions and 14 deletions
|
|
@ -9946,16 +9946,19 @@ var VirtualRenderer = function(container, theme) {
|
|||
};
|
||||
|
||||
this.getTextAreaContainer = function() {
|
||||
return this.scroller;
|
||||
return this.container;
|
||||
};
|
||||
|
||||
this.moveTextAreaToCursor = function(textarea) {
|
||||
this.moveTextAreaToCursor = function(textarea) {
|
||||
var pos = this.$cursorLayer.getPixelPosition();
|
||||
if (!pos)
|
||||
return;
|
||||
|
||||
textarea.style.left = (pos.left + this.$padding) + "px";
|
||||
textarea.style.top = pos.top + "px";
|
||||
var bounds = this.content.getBoundingClientRect();
|
||||
var offset = (this.layerConfig && this.layerConfig.offset) || 0;
|
||||
|
||||
textarea.style.left = (bounds.left + pos.left + this.$padding) + "px";
|
||||
textarea.style.top = (bounds.top + pos.top - this.scrollTop + offset) + "px";
|
||||
};
|
||||
|
||||
this.getFirstVisibleRow = function() {
|
||||
|
|
@ -11417,7 +11420,7 @@ define("text!ace/css/editor.css", ".ace_editor {" +
|
|||
"}" +
|
||||
"" +
|
||||
".ace_editor textarea {" +
|
||||
" position: absolute;" +
|
||||
" position: fixed;" +
|
||||
" z-index: -1;" +
|
||||
" opacity: 0;" +
|
||||
" width: 10px;" +
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -45,7 +45,7 @@ require({
|
|||
});
|
||||
|
||||
var deps = [ "pilot/fixoldbrowsers", "pilot/plugin_manager", "pilot/settings",
|
||||
"pilot/environment", "demo/startup" ];
|
||||
"pilot/environment", "demo/demo" ];
|
||||
|
||||
var plugins = [ "pilot/index", "cockpit/index", "ace/defaults" ];
|
||||
require(deps, function() {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
}
|
||||
|
||||
.ace_editor textarea {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
width: 10px;
|
||||
|
|
|
|||
|
|
@ -297,16 +297,19 @@ var VirtualRenderer = function(container, theme) {
|
|||
};
|
||||
|
||||
this.getTextAreaContainer = function() {
|
||||
return this.scroller;
|
||||
return this.container;
|
||||
};
|
||||
|
||||
this.moveTextAreaToCursor = function(textarea) {
|
||||
this.moveTextAreaToCursor = function(textarea) {
|
||||
var pos = this.$cursorLayer.getPixelPosition();
|
||||
if (!pos)
|
||||
return;
|
||||
|
||||
textarea.style.left = (pos.left + this.$padding) + "px";
|
||||
textarea.style.top = pos.top + "px";
|
||||
var bounds = this.content.getBoundingClientRect();
|
||||
var offset = (this.layerConfig && this.layerConfig.offset) || 0;
|
||||
|
||||
textarea.style.left = (bounds.left + pos.left + this.$padding) + "px";
|
||||
textarea.style.top = (bounds.top + pos.top - this.scrollTop + offset) + "px";
|
||||
};
|
||||
|
||||
this.getFirstVisibleRow = function() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "ace",
|
||||
"description": "Ajax.org Code Editor is a full featured source code highlighting editor that powers the Cloud9 IDE",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"homepage" : "http://github.com/ajaxorg/ace",
|
||||
"engines": {"node": ">= 0.2.0"},
|
||||
"author": "Fabian Jakobs <fabian@ajax.org>",
|
||||
|
|
@ -28,4 +28,4 @@
|
|||
"type": "LGPL",
|
||||
"url": "http://www.gnu.org/licenses/lgpl.html"
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue