1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00

direct hitarea setting for textinput;

This commit is contained in:
lgtst 2022-07-27 20:12:44 +03:00
parent b5e4ce96d3
commit 2fe350f4f7

View File

@ -867,6 +867,9 @@ function DefaultBoxGenerator(styles)
let box = new PIXI.Graphics();
if (this._multiline) {
// When fill and alpha both 0 it for some reason ignores pointer events.
// But not when hitArea is set directly...
box.hitArea = new PIXI.Rectangle(0, 0, w, h);
box.interactive = !this._disabled;
box.on("pointerdown", () => {
this._dom_input.focus();