You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File dialogs, e.g. when clicking on an <input type="file">
I only tested on macOS and assumed this was by design.
I personally abstracted this away in our app like this:
Neutralino.os.showOpenDialog('Open a file',{multiSelections: false}).then((entries)=>{constpath=entries[0];Neutralino.filesystem.readBinaryFile(path).then((data)=>{constdataArray=newUint8Array(data);callback(dataArray,path);});})return;
I added similar code for downloading / saving a file.
I don’t think it is by design because these features work out of the box on both Windows and Linux. I assume it is just an oversight in the macOS implementation, which requires manual wiring code for these things to work (the mentioned UI delegate) while the other platforms’ webview libraries don’t.
Describe the bug
WebKit's WKWebView needs an implementation of WKUIDelegate for some interactions that require native UI bits, such as:
alert()
,confirm()
,prompt()
)<input type="file">
Neutralino does not provide such a delegate (see
webview.h
). Accordingly, the above browser features do not work on macOS (nothing happens).To reproduce
<input type="file">
to the HTML.alert('foo')
call to the JavaScript code.neu run
.Expected behavior
Actual behavior
Specifications
Additional context
Follow-up of neutralinojs/neutralinojs#1005.
The text was updated successfully, but these errors were encountered: