Comments (6)
I have same version of Polyglot and Safari however I couldn't reproduce the error.
What's your keyboard shortcuts settings?
from polyglot.
I have same key, but no keyboard modifier and that`s the key.
from polyglot.
It seems weird because I have no issue without keyboard modifiers.
Try to clear Key field and close the settings window, then put a new key to Key again and reload web pages.
from polyglot.
Hi, this issue appears to be related to:
https://stackoverflow.com/questions/46268576/angular-4-safari-settings-object-without-keyvalue-property-defined
In my case, the function seems to be blowing up because the settings object has no KeyValue assigned to it.
Please be very careful with this extension.
If key settings are not configured, the following code should not be blowing up:
function handleKeypress(e) {
var applyMeta = settings.useMetaKey ? e.metaKey : true;
var applyShift = settings.useShiftKey ? e.shiftKey : true;
var applyCtrl = settings.useCtrlKey ? e.ctrlKey : true;
var applyAlt = settings.useAltKey ? e.altKey : true;
var applyKey = settings.keyValue.charCodeAt(0) === e.keyCode; <------ Unless you know that settings.keyValue is always set. In my Safaria configuration, when I check the polyglot configuration, there seems to be no key bound.
if (applyMeta && applyShift && applyCtrl && applyAlt && applyKey) {
e.preventDefault();
getSelectedText();
}
}
On the console, my settings object looks as follows:
{targetLanguage: "en", useMetaKey: true} = $1
Even after trying to select a key setting (e.g. command) the configuration for the keyValue continues empty.
In the end, to work-around the issue, it was necessary to:
Make the key configuration to use the key: Shift + T
By updating the primary key setting and the key value, it seems like the polyglot configuration became good again and the error has now gone away.
Thanks.
from polyglot.
Updated to v2.1.0
- Suppress errors for invalid keyboard shortcuts
https://github.com/uetchy/Polyglot/releases/tag/v2.1.0
from polyglot.
See v2.2.0 for fixing this issue.
from polyglot.
Related Issues (20)
- Incorrect application button behavior
- The icon to confirm translation "wandering" around the monitor HOT 2
- The anomalous behavior of the window with the translation HOT 2
- The translation window must be visible in any color of the website
- Unable to translate on the github website when opening an external link HOT 7
- The icon to confirm translation does not appear on the www.howtogeek.com website
- Improving field visibility for keyboard shortcut in dark theme
- On github, translation is not possible everywhere
- Translation fails when text contains link HOT 9
- Missing something HOT 3
- Bug when translating text containing html tags HOT 2
- Bug: no setting available in the extension preferences HOT 1
- Workaround: pop-up disappears in Safari 16.4 HOT 43
- Bug: HOT 1
- Feature request: HOT 1
- Bug: translation box disappears immediately HOT 1
- Bug: The extension stop working on Ventura 13.3.1(a) and Safari 16.4 (18615.1.26.110.1) HOT 1
- Bug: Not working after update HOT 3
- Bug: after click `translate`, the box not show up. HOT 2
- Improving the readability of the icon on the dark theme of the website
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polyglot.