Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
6.9.1, 6.10.0
-
None
-
-
a89ac4b88 (dev), 839168518 (dev)
Description
As originally reported in the comment at <https://codereview.qt-project.org/c/qt/qtbase/+/624759/8#message-2337fa615c59cc988da6c7a390e296a8614cc10f> "wasm: call focus on window if not editable": At least when built against recent Qt6 dev branch, LibreOffice built for Wasm no longer receives keyboard input. There is no prebuilt binaries of Wasm LibreOffice against Qt6 (for production, we currently still stick to Qt5, see e.g. <https://zetaoffice.net/>), but you can build it with a recipe like
set -e
mkdir "${HOME?}"/lo-qt6
git -C "${HOME?}"/lo-qt6 clone https://github.com/emscripten-core/emsdk.git
(
cd "${HOME?}"/lo-qt6/emsdk
./emsdk install latest
./emsdk activate latest
)
git -C "${HOME?}"/lo-qt6 clone https://github.com/qt/qt5.git
(
cd "${HOME?}"/lo-qt6/qt5
./init-repository --module-subset=qtbase
)
mkdir "${HOME?}"/lo-qt6/qt5-host-build
(
cd "${HOME?}"/lo-qt6/qt5-host-build
"${HOME?}"/lo-qt6/qt5/configure -prefix "${HOME?}"/lo-qt6/qt5-host-inst
)
cmake --build "${HOME?}"/lo-qt6/qt5-host-build
cmake --install "${HOME?}"/lo-qt6/qt5-host-build
mkdir "${HOME?}"/lo-qt6/qt5-build
(
cd "${HOME?}"/lo-qt6/qt5-build
. "${HOME?}"/lo-qt6/emsdk/emsdk_env.sh
CFLAGS=-sSUPPORT_LONGJMP=wasm CXXFLAGS=-sSUPPORT_LONGJMP=wasm \
LDFLAGS=-sSUPPORT_LONGJMP=wasm "${HOME?}"/lo-qt6/qt5/configure \
-feature-thread -feature-wasm-exceptions -xplatform wasm-emscripten \
-prefix "${HOME?}"/lo-qt6/qt5-inst -qt-host-path \
"${HOME?}"/lo-qt6/qt5-host-inst
cmake --build "${HOME?}"/lo-qt6/qt5-build
cmake --install "${HOME?}"/lo-qt6/qt5-build
)
git -C "${HOME?}"/lo-qt6 clone https://git.libreoffice.org/core
(
cd "${HOME?}"/lo-qt6/core
. "${HOME?}"/lo-qt6/emsdk/emsdk_env.sh
./autogen.sh --with-distro=LibreOfficeWASM32 --disable-qt5 --enable-qt6 \
--disable-emscripten-proxy-to-pthread \
MOC6="${HOME?}"/lo-qt6/qt5-host-inst/libexec/moc \
QT6DIR="${HOME?}"/lo-qt6/qt5-inst
make
emrun \
"${HOME?}"/lo-qt6/core/workdir/installation/LibreOffice/emscripten/qt_soffice.html
)
which has been seen working with recent latest emsdk 4.0.8, recent qt5 dev head b330de576f1381eaf7c0d7d276f8eda809826382 and recent LibreOffice master head 3dd2d7f449f13bec0f0a5c6e0c33a143409c3723. (And when you then do modifications to the Qt code, use something like
(
. "${HOME?}"/lo-qt6/emsdk/emsdk_env.sh
cmake --build "${HOME?}"/lo-qt6/qt5-build
cmake --install "${HOME?}"/lo-qt6/qt5-build
make -C "${HOME?}"/lo-qt6/core Executable_soffice_bin.clean
make -C "${HOME?}"/lo-qt6/core
)
to re-link the LibreOffice binary.)
To reproduce the issue, in the LibreOffice start center click on "Writer Document", then type "x" and observe that erroneously no text is inserted into the document.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-136687 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
644652,6 | wasm: set focus to m_canvas instead of m_window | dev | qt/qtbase | Status: MERGED | +2 | 0 |
644891,2 | wasm: handle changes in inputMethodAccepted() | dev | qt/qtbase | Status: MERGED | +2 | 0 |