HTMLViewer and file uploads on MacOS

Feedback Case Number: 42744

It’s been 6 years since this bug was filed and verified, and as far as I can tell there has been no interest in fixing it. I was going great guns on a quickie app for work until (surprise) I hit a showstopper. Now my project is no longer a quickie. Again. Sigh.

If I have to resort to diving into Cocoa and declaring it all, this will be the opposite of quick. It would be great if this project could be quick again. Has anyone come up with a workaround that DOES NOT — I repeat: DOES NOT — involve a plugin?

I believe I was very clear about not having my thread spammed by ads for plugins. Thanks.

1 Like

it may be achieved via declares if you are interested in that.
But that may involve patching an objective-C class on macOS.

I consider calling into Cocoa a last resort in this instance. I’m hoping to avoid having to tear into WKUIDelegate unless I absolutely have to, although it’s looking like I’ll have to. My hope was that somewhere along the way someone out there came up with something workable in native Xojo code (or even some clever Javascript) that could get me back on track quickly.

If not, I can probably work out the declares on my own. I have decent experience there. I just didn’t want to have to take the time to implement something which (IMO) should already be implemented, since it works on other platforms.

However, if anyone has done this already and was willing to share, (or maybe it’s already here and I just didn’t find it,) I certainly would not turn down the help.

Just because not everyone has feedback installed, a quick summary of #42744

42744 - HTMLViewer with <input type=“file”> does not invoke file dialog on MacOS

February 26, 2016 - 5:24pm UTC

Steps: Using the Xojo simple browser sample application navigate to a website that offers to upload a file (you can try W3Schools Tryit Editor).

When you click on the ‘Choose File’ button to select a file to upload on Windows and Linux you will be presented with a file chooser dialog. On MacOS nothing will happen. If you view the same website using Safari you will be presented with a file chooser (sheet) dialog so Safari works as expected