mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-12 08:38:10 +00:00
Merge pull request #402 from thewhodidthis/bf#395--text-input
visual/TextBox/TextInput: only disable text substitution when multiline
This commit is contained in:
commit
6cd6135ce7
@ -319,6 +319,7 @@ export class TextBox extends util.mix(VisualStim).with(ColorMixin)
|
|||||||
|
|
||||||
padding: padding_px + 'px',
|
padding: padding_px + 'px',
|
||||||
multiline,
|
multiline,
|
||||||
|
text: this._text,
|
||||||
height: multiline ? (height_px - 2 * padding_px) + 'px' : undefined,
|
height: multiline ? (height_px - 2 * padding_px) + 'px' : undefined,
|
||||||
width: (width_px - 2 * padding_px) + 'px'
|
width: (width_px - 2 * padding_px) + 'px'
|
||||||
},
|
},
|
||||||
|
@ -22,6 +22,7 @@ export class TextInput extends PIXI.Container
|
|||||||
background: 'none',
|
background: 'none',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
outline: 'none',
|
outline: 'none',
|
||||||
|
text: '',
|
||||||
transformOrigin: '0 0',
|
transformOrigin: '0 0',
|
||||||
lineHeight: '1'
|
lineHeight: '1'
|
||||||
},
|
},
|
||||||
@ -56,7 +57,7 @@ export class TextInput extends PIXI.Container
|
|||||||
this._selection = [0, 0];
|
this._selection = [0, 0];
|
||||||
this._restrict_value = '';
|
this._restrict_value = '';
|
||||||
this._createDOMInput();
|
this._createDOMInput();
|
||||||
this.substituteText = false;
|
this.substituteText = !this._multiline;
|
||||||
this._setState('DEFAULT');
|
this._setState('DEFAULT');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user