kopia lustrzana https://github.com/backface/turtlestitch
Remove extra hiddenText assignment in clipboards
rodzic
abe5f3fe1d
commit
1f9e923d04
11
morphic.js
11
morphic.js
|
@ -4496,19 +4496,18 @@ CursorMorph.prototype.init = function (aStringOrTextMorph) {
|
|||
this.target.setAlignmentToLeft();
|
||||
}
|
||||
this.gotoSlot(this.slot);
|
||||
|
||||
|
||||
// Add hidden text box for copying and pasting
|
||||
this.hiddenText = document.createElement('textarea');
|
||||
this.target.hiddenText = this.hiddenText;
|
||||
this.hiddenText.style.position = 'absolute';
|
||||
this.hiddenText.style.right = '101%'; // placed just out of view
|
||||
|
||||
|
||||
document.body.appendChild(this.hiddenText);
|
||||
|
||||
|
||||
this.hiddenText.value = this.target.selection();
|
||||
this.hiddenText.focus();
|
||||
this.hiddenText.select();
|
||||
|
||||
|
||||
this.hiddenText.addEventListener(
|
||||
'keypress',
|
||||
function (event) {
|
||||
|
@ -4518,7 +4517,7 @@ CursorMorph.prototype.init = function (aStringOrTextMorph) {
|
|||
},
|
||||
false
|
||||
);
|
||||
|
||||
|
||||
this.hiddenText.addEventListener(
|
||||
'keydown',
|
||||
function (event) {
|
||||
|
|
Ładowanie…
Reference in New Issue