add canvas offset to textarea position (#3306)

This commit is contained in:
Andrea Bogazzi 2016-10-01 14:05:46 +02:00 committed by GitHub
parent a8827e7a5c
commit e0f687298c

View file

@ -496,6 +496,10 @@
p.y = maxHeight;
}
// add canvas offset on document
p.x += this.canvas._offset.left;
p.y += this.canvas._offset.top;
return { left: p.x + 'px', top: p.y + 'px', fontSize: charHeight };
},