Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Päälle/Pois functionality in Firefox context menu #8

Closed
wapsi opened this issue Jan 20, 2021 · 12 comments
Closed

Add Päälle/Pois functionality in Firefox context menu #8

wapsi opened this issue Jan 20, 2021 · 12 comments

Comments

@wapsi
Copy link

wapsi commented Jan 20, 2021

Add Päälle/Pois functionality in Firefox context menu. Now I need to push the Finnish flag (extenstion) button and select Päälle or Pois to enable or disable the spell checking. It would be easier if this option was available in the Firefox context menu (the menu which opens when I right click ~anywhere on the website):

[X] Finnish Spell Checking

Firefox allows to edit the context menu from the addons, here is some documentation about it: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Context_menu_items

@fluks
Copy link
Owner

fluks commented Jan 21, 2021

Should the context menu switch apply only on the current tab or be a global switch?

@wapsi
Copy link
Author

wapsi commented Jan 21, 2021

Hmm, good question. Personally I would prefer to set it on globally as long as the user switch it back to off.

And I think this could be partly linked to my another feature request: #7 If that persistent setting is set to ON then this should set the ON/OFF globally as well.

@fluks
Copy link
Owner

fluks commented Jan 21, 2021

So, the action bar (toolbar) and the context menu switches would do the same action, globally switch between always disabled or enabled? I'll try to implement this then.

@wapsi
Copy link
Author

wapsi commented Jan 21, 2021

Yeah, exactly.

@fluks
Copy link
Owner

fluks commented Jan 26, 2021

I added the context menu item in the enabled-disabled branch if you want to test it.

@wapsi
Copy link
Author

wapsi commented Jan 26, 2021

Yeah, I tested this and it works, thanks!

BTW: Just a minor UIX thing: Is it possible to implement the context menu entry without a submenu? Maybe it can achieved by using menu entry with content: "Fin Spell: Set semporarily On" / "Fin Spell: Set semporarily Off" (depending what setting is currently set) directly on the root context menu:
fin-spell-mockup1

@wapsi
Copy link
Author

wapsi commented Jan 26, 2021

And another thing: If toggle the spelling temporarily off (either from the context menu or by clicking the Finnish flag icon) it removes all the highlightings immediately but if I turn it back on it does not trigger the spell checking immediately: I have to change the text (put one space for example at the end) and after that it highlights the mispelled words.

Is it possible to trigger the spell checking for the whole text immediately the spell checking is turned on (temporarily)?

@fluks
Copy link
Owner

fluks commented Jan 26, 2021

Yeah, I tested this and it works, thanks!

BTW: Just a minor UIX thing: Is it possible to implement the context menu entry without a submenu? Maybe it can achieved by using menu entry with content: "Fin Spell: Set semporarily On" / "Fin Spell: Set semporarily Off" (depending what setting is currently set) directly on the root context menu:
fin-spell-mockup1

It's possible.

@fluks
Copy link
Owner

fluks commented Jan 26, 2021

And another thing: If toggle the spelling temporarily off (either from the context menu or by clicking the Finnish flag icon) it removes all the highlightings immediately but if I turn it back on it does not trigger the spell checking immediately: I have to change the text (put one space for example at the end) and after that it highlights the mispelled words.

Is it possible to trigger the spell checking for the whole text immediately the spell checking is turned on (temporarily)?

And this is possible too. Probably a simple call to highlight all the inputs.

@fluks
Copy link
Owner

fluks commented Jan 27, 2021

And another thing: If toggle the spelling temporarily off (either from the context menu or by clicking the Finnish flag icon) it removes all the highlightings immediately but if I turn it back on it does not trigger the spell checking immediately: I have to change the text (put one space for example at the end) and after that it highlights the mispelled words.
Is it possible to trigger the spell checking for the whole text immediately the spell checking is turned on (temporarily)?

And this is possible too. Probably a simple call to highlight all the inputs.

Added in the newest commit. All the input elements are spell checked on page load and if you temporarily enable spell checking. The last input element has the focus, this probably needs fixing. And the last word in input elements are not spell checked. I guess when the element gets focused and the cursor is placed in the end and the last word is considered as the current word you are typing.

@fluks
Copy link
Owner

fluks commented Feb 1, 2021

Now in the latest commit, on off context menu item should be shown without a sub-menu when possible.

@wapsi
Copy link
Author

wapsi commented Feb 3, 2021

Yes, thanks! It's perfect!

I think this issue / feature request can be closed if you want to? I can confirm that this functionality is added and tested, thanks!

@fluks fluks closed this as completed Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants