mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-11 16:18: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',
|
||||
multiline,
|
||||
text: this._text,
|
||||
height: multiline ? (height_px - 2 * padding_px) + 'px' : undefined,
|
||||
width: (width_px - 2 * padding_px) + 'px'
|
||||
},
|
||||
|
@ -22,6 +22,7 @@ export class TextInput extends PIXI.Container
|
||||
background: 'none',
|
||||
border: 'none',
|
||||
outline: 'none',
|
||||
text: '',
|
||||
transformOrigin: '0 0',
|
||||
lineHeight: '1'
|
||||
},
|
||||
@ -56,7 +57,7 @@ export class TextInput extends PIXI.Container
|
||||
this._selection = [0, 0];
|
||||
this._restrict_value = '';
|
||||
this._createDOMInput();
|
||||
this.substituteText = false;
|
||||
this.substituteText = !this._multiline;
|
||||
this._setState('DEFAULT');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user