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
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue