Details
-
Bug
-
Resolution: Incomplete
-
P1: Critical
-
None
-
6.9
-
None
-
-
WebAssembly
Description
Hi,
I am using QFileDialog::getOpenFileContent() to load a file from file system in WebAssembly. The function successfully opens the file picker dialog in Qt WebAssembly, but throws a JavaScript error after the user selects a file and clicks "OK". The error occurs on macOS in both Safari and Firefox:
TypeError: undefined is not an object (evaluating 'handle[key]')
The dialog itself opens correctly and the error only occurs after the user selects a file and confirms. The same code works as expected on native desktop Qt.This is the minimal example on how I can reproduce it:
QFileDialog::getOpenFileContent(QLatin1String("*"), [](const QString &fileName, const QByteArray &data) { qDebug() << "File selected: " << fileName; });
Here are the screenshots where:
1. I load the app on my browser
2. open the file dialog
3. select a file and see the error
4. expand the error