mclemente / fvtt-module-polyglot

Talk to others using a language you can speak and scrambles text you can't understand.
MIT License
41 stars 48 forks source link

Polyglot language dropdown not visible when logged into a game in Safari #275

Closed solarflair closed 1 year ago

solarflair commented 1 year ago

Describe the bug The Polyglot dropdown box is missing when viewed in Safari browser on MacOS. It is visible as expected in the same game when logged in with Firefox.

To Reproduce Steps to reproduce the behavior:

  1. Join a game in the Safari browser on MacOS.
  2. Attempt to locate a dropdown language selector.

Expected behavior The language selector should be visible in Safari.

Screenshots An Imgur album showing the dropdown location under Safari and Firefox, logged in as the same user for each

Additional context Using Safari 16.2, which is technically not a supported browser for Foundry but it seems to work very well, aside from this anyway. I'm not sure if this bug is due to a Polyglot bug or a Foundry limitation with Safari.

LevitatingKraken commented 1 year ago

Also on Chrome using Mac (I see only the language "aartuk")

solarflair commented 1 year ago

Also on Chrome using Mac (I see only the language "aartuk")

The language selector looks fine to me in Chrome, at least with the WFRP system.

mclemente commented 1 year ago

I'm not sure how to work on this issue since I don't own a Mac and Safari isn't available for Windows anymore. The CSS for the selector is just a flex and a margin values, not something that should cause conflict due to browser incompatibility for CSS features.

solarflair commented 1 year ago

If there are any relevant logs or anything I can provide, I'd be happy to.

mclemente commented 1 year ago

On Safari's Developer Tools, go to Sources, add a breakpoint on line 213 of the polyglot/module/logic.js file and reload to make sure it is adding the dropdown box to the chat log. Also, on the Elements tab, you could probably check if the html for the selector is right after the chat controls.

solarflair commented 1 year ago

So I'm no JS developer so a lot of of what I'm seeing may be over my head, but nothing stood out when I added the breakpoint and reloaded.

However, I did notice that LanguageProvider.js is throwing an error in the console in Safari on line 1085: SyntaxError: Invalid regular expression: invalid group specifier name

I don't see the same error in Firefox's console.

mclemente commented 1 year ago

Oh, that's Safari not supporting the positive lookbehind RegEx. It seems that error is fixed on the latest Safari Technology Preview, so I guess it should be fixed soon for you. But that bug should be exclusive to dnd5e, did you test on wfrp4e?

solarflair commented 1 year ago

This was on wfrp4e. I don't use any other game system.

LevitatingKraken commented 1 year ago

It doesn't work on 5e with Mac/Chrome (latest) The dropdown doesn't open. Let me know if/how to provide more information

mclemente commented 1 year ago

Hello, when this issue was posted I wasn't aware Safari is not a supported browser for FoundryVTT, so I guess this issue has less to do with Polyglot and more with how Safari.

With that said, all I can do is suggest you use another browser instead.

Closing this issue as a wontfix.