Comments (7)
- You might want to first translate a piece of text, then copy it (the original text). Because of this bug(?) you have to select the target text twice.
- If you go to settings and decide to enable "Quick translation by selection" you practically have to also add a modifier key, otherwise you can't copy any text from a website. This is at least a UX issue of the options page.
from linguist.
This behavior needs for accessibility. When user select text, they focus on button to translate selected text or on popup with translated text.
Why you need to change this behavior? Whats problems occurs due to this behavior?
from linguist.
This behavior needs for accessibility.
I understand that focusing the popup might make sense, but there should be a way to also keep the selection. For example, in Chromium you can select text and then change focus with tab and the text won't get unselected (this doesn't appear to be the case for Gecko though).
Whats problems occurs due to this behavior?
As I mentioned, with "Quick translation by selection" you practically can't copy any text on the page. Or you have to resort to waiting for translation to complete, then copy the original text from the translation popup.
Without "Quick translation by selection", you might also want to first translate selected text, then copy it. Currently you'd have to select it again.
from linguist.
Option "Quick translation by selection" needs for fast translation selected text. You should to pick some modifiers keys to not translate any selected text.
If you pick some modifier keys for this option, is some problems with behavior leave for you?
from linguist.
Firstly, apologies, I just found out that the issue affects Gecko (Firefox) only (not Chromium).
If you pick some modifier keys for this option, is some problems with behavior leave for you?
You're right, adding a modifier key can improve things in some cases. But still it's preferable if the text selection is kept.
- If changing focus is necessary, maybe we need to search for a way to keep the selection.
- Maybe need to also add an option to not
focus
the popup. And, additionally, maybe change the effectivetabindex
of the popup, as I mentioned. - If none of the above, either way I think that the deselection with "Quick translation by selection" is frustrating, and should not manifest itself after you've just installed the extension and only changed the "Translation trigger" option. Perhaps with "Quick translation by selection" a modifier key should also be required to be pressed by default.
from linguist.
I will investigate your approach with tab index. I'm not sure it will works with elements in shadowRoot, but i will try, because it may be good solution.
We could restore selection, but i still do not understand whats problems you have due to current behavior.
Please, explain why you want to preserve selection. If you have multiple problems due to this behavior, write it one by one and let's discuss each one.
from linguist.
@WofWca both use case available right now. You can select text, copy it and then translate.
When you translate text, you focuse on popup with translation, it is pointless to preserve selection, because focused element is not a selection container.
Also, when you press button to translate selected text, you manually focus on this button (and then on popup), so it's a expected behavior that selection will reset and focus will change on button.
I still not see why you want to selection will preserved.
I will check behavior in chromium browsers, if this behavior different of firefox, i will make it consistent.
from linguist.
Related Issues (20)
- `Browserslist: caniuse-lite is outdated.`
- Explore the Manifest V3 HOT 2
- Paragraph with bold text under it will break continuity HOT 2
- LanguageTool Integration HOT 1
- `1 critical` vulnerability when running `npm install` HOT 5
- Listing on Firefox Android extension store HOT 4
- Allow to use context menu and popup button for translate selected text
- Make the Netflix subtitles hoverable so that the popup can be utilized with it. HOT 5
- Add copy paste linter for code HOT 1
- Update a project identity
- `moderate` severity `tar` vulnerability in dependencies HOT 2
- style: status badge in `README.md` HOT 1
- Update CodeQL version in CI config HOT 3
- Update required node version to 20 HOT 4
- Add `.github/pull_request_template.md` to encourage contributors to provide the necessary context for a PR HOT 2
- Add more code analysis tools
- `CodeQL` badge link is no longer valid HOT 1
- check if tests pass with a change
- Use in Web Application HOT 2
- Use Weblate for localization
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 linguist.