YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
24 stars 8 forks source link

In-Game: url_open() should use the OS's default browser and mail client settings, not the .html file association #243

Open iampremo opened 1 year ago

iampremo commented 1 year ago

Description

The runner will use the user-specified default "HTML Editor" file association instead of guaranteeing the default browser when dealing with HTML/HTTP functions - so if you select a HTML file, right-click it and set the default program for opening that type of file to be a non-Browser application, the Runner will either open that application when a HTML/HTTP function is called or nothing will appear to happen at all.

We see this commonly reported as a bug because Notepad or some other text editor is being opened - i.e.: image

Or that Windows Explorer opens. Or that nothing visible happens.

Similarly, trying to url_open() a "mailto" protocol link will try to open your browser to perform this action. This then fails in a number of recent OSes (even though if you were to type the same URL into the address bar your browser will likely open your default mail client just fine). Again, this should be launching the system email client directly rather than asking the browser to do it.

Steps To Reproduce

  1. Start GM and import the attached project test-url_open.zip
  2. Find a .html file on your system and set its Default 'Open With' to a non-Browser application, such as Notepad
  3. Run it for Windows
  4. Observe that either the application you specified is opened or nothing visible happens
  5. Reset your default Open With to a browser
  6. Run again for Windows
  7. Observe that the browser opens and takes you to the GameMaker website
YYDan commented 2 months ago

Obviously, for anyone who currently has this issue, you can very quickly fix your system by simply setting those two file associations back to being a web browser in Windows' "Settings" app (as shown above).

YYDan commented 2 months ago

HTML5 works as per the manual - so, just fine for all three functions as long as you allow the original tab to be allowed to open popups first!: image