wasm: set input element position on startup

Follow-up from commit c844a7a5.

The input element was taking up space on the html body,
and was offsetting the Qt app content, making it partly
invisible.

The element already has position: "absolute" which should
remove it from the layout, but it looks like it needs
to have a set position as well on some browser for that
to happen.

Pick-to: 6.7 6.8
Change-Id: I618d2561eb32e181797034d0b3005d716d4f6136
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Inho Lee <inho.lee@qt.io>
This commit is contained in:
Morten Sørvig 2024-07-23 16:15:44 +02:00 committed by Morten Johan Sørvig
parent 7a21ba15ed
commit 59645a409b

View File

@ -253,6 +253,8 @@ QWasmInputContext::QWasmInputContext()
m_inputElement.set("contenteditable","true");
m_inputElement["style"].set("position", "absolute");
m_inputElement["style"].set("left", 0);
m_inputElement["style"].set("top", 0);
m_inputElement["style"].set("opacity", 0);
m_inputElement["style"].set("display", "");
m_inputElement["style"].set("z-index", -2);