Plugin Author
edo888
(@edo888)
Hi,
I have checked with Google Chrome on Windows and it works fine for me. I use the Enter button, Space does nothing for me.
The regular dropdown (<select>) is controlled by the OS and we do not have full control on how it behaves.
Thanks! 🙂
It also works for me in Chrome on Linux. It does not work for me in Firefox for Linux or macOS. On macOS in Chrome I’m also unable to select a different language from the keyboard.
The non-working instances I can get the language select to highlight, but then pressing enter does not bring up the available languages for me to choose from.
What is your browser support policy.
Plugin Author
edo888
(@edo888)
Hi,
Can you try to change wp-content/plugins/gtranslate/dropdown.js file and change:
if(current_lang != default_language)
load_tlib();
else
document.querySelectorAll(u_class).forEach(function(e){e.addEventListener('pointerenter',load_tlib)});
to
if(current_lang != default_language)
load_tlib();
else
document.querySelectorAll(u_class).forEach(function(e){['pointerenter','focus'].forEach(function(evt){e.addEventListener(evt,load_tlib)})});
Let me know to check once it is done.
I think the issue is that the js library is not being lazy loaded when needed, this change will try to load it also on focus event.
Usually for such cases we recommend using the paid version, which doesn’t depend on js libraries.
Thanks! 🙂
That doesn’t appear to fix it. For reference my customer reported this to me using:
Browser: Google chrome version 140.0.7339.186
OS: Windows 11 version 24H2
Plugin Author
edo888
(@edo888)
Hi,
I have checked and I do not see the change.
Thanks!
We run on Kubernetes and I tested on a different site with a single pod that didn’t create a full deploy cycle. I’ve now deployed it to the site linked above with a custom version of the plugin. I still am unable to access the language menu. I’ll leave the modified version up for you to look at.
Plugin Author
edo888
(@edo888)
OK, this should do the trick:
if(current_lang != default_language)
load_tlib();
else {
document.querySelectorAll(u_class).forEach(function(e){e.addEventListener('pointerenter',load_tlib)});
document.querySelector(u_class + ' .gt_selector').addEventListener('focus',load_tlib);
}
Thanks! 🙂
Still works in Chrome on Linux.
Does not work on Firefox on Linux.
Does not work on macOS in Chrome or Firefox or Safari.
I’m heading out for a few days from work so I may not get back to this till next Monday.
Are there any other updates on this?
Plugin Author
edo888
(@edo888)
Hi,
I have checked and it worked for me on Windows. I cannot comment about other platforms as I haven’t tested.
Thanks! 🙂
Yeah that’s not helpful. Is the official policy of gtranslate that you don’t support macOS and Linux based browsers?
When will your testing protocol include macOS and Linux? Heck Linux is easy to test with a virtual machine and that’s free.
Plugin Author
edo888
(@edo888)
My suggestion is to use our paid version. I do not want to spend time on this testing all the platforms.
Thanks! 🙂
Don’t love that. What if I find a bug in the paid version that affects browsers on macOS or Linux? Will those be supported?