Remove extra hiddenText assignment in clipboards

dev
Michael Ball 2015-12-17 00:41:23 -08:00
rodzic abe5f3fe1d
commit 1f9e923d04
1 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -4496,19 +4496,18 @@ CursorMorph.prototype.init = function (aStringOrTextMorph) {
this.target.setAlignmentToLeft(); this.target.setAlignmentToLeft();
} }
this.gotoSlot(this.slot); this.gotoSlot(this.slot);
// Add hidden text box for copying and pasting // Add hidden text box for copying and pasting
this.hiddenText = document.createElement('textarea'); this.hiddenText = document.createElement('textarea');
this.target.hiddenText = this.hiddenText;
this.hiddenText.style.position = 'absolute'; this.hiddenText.style.position = 'absolute';
this.hiddenText.style.right = '101%'; // placed just out of view this.hiddenText.style.right = '101%'; // placed just out of view
document.body.appendChild(this.hiddenText); document.body.appendChild(this.hiddenText);
this.hiddenText.value = this.target.selection(); this.hiddenText.value = this.target.selection();
this.hiddenText.focus(); this.hiddenText.focus();
this.hiddenText.select(); this.hiddenText.select();
this.hiddenText.addEventListener( this.hiddenText.addEventListener(
'keypress', 'keypress',
function (event) { function (event) {
@ -4518,7 +4517,7 @@ CursorMorph.prototype.init = function (aStringOrTextMorph) {
}, },
false false
); );
this.hiddenText.addEventListener( this.hiddenText.addEventListener(
'keydown', 'keydown',
function (event) { function (event) {