Giter VIP home page Giter VIP logo

Comments (12)

fluks avatar fluks commented on July 21, 2024

I think we can't copy the exact behavior of the in-built spell checker. The best we can do is not to spell check the word under the cursor or near the cursor.

from fin-spell.

wapsi avatar wapsi commented on July 21, 2024

Yeah, but I think that should be enough. At least we'll get rid of the immediately highlighting of the words that I'm still typing :)

from fin-spell.

fluks avatar fluks commented on July 21, 2024

Well, that was easy if it works now. I pushed a commit to the same branch.

from fin-spell.

wapsi avatar wapsi commented on July 21, 2024

Ok, I just compiled the new version and the initial tests are looking good! I'll try to write some more if any issues are found...

from fin-spell.

wapsi avatar wapsi commented on July 21, 2024

I think it works mostly now. But there is a case if I change (mistype) the word and move the cursor away it won't trigger the spell checking. I have to hit enter or put space or something else to trigger the spell checking. I made a screen record about the issue (it's easier to see what I mean from there):
https://user-images.githubusercontent.com/11405096/105880229-cb7ff700-600b-11eb-98a2-a97ce7aae0ab.mp4

from fin-spell.

fluks avatar fluks commented on July 21, 2024

I have to add handler for click events to change that. Seems like it's an easy fix and I don't see anything negative happening if I do that.

from fin-spell.

fluks avatar fluks commented on July 21, 2024

The same thing happens if you move the cursor with keyboard, so click event handler doesn't solve this entirely.

from fin-spell.

fluks avatar fluks commented on July 21, 2024

Using a keydown event, for example, solves this but then the text isn't spell checked when you paste text with a mouse. Pasting with a mouse doesn't dispatch click event. And we can't have a listener for an input and a key* events because then text is spell checked twice. Looks like we have to choose what to support. Which one you would like to have?

from fin-spell.

wapsi avatar wapsi commented on July 21, 2024

Hmm, OK I undestand. I assume there is no possibility to listen changes of the textarea/input value / its content somehow?

from fin-spell.

fluks avatar fluks commented on July 21, 2024

I take that back. There's a paste event, so I think changing input to keyup and adding click and paste event handlers the text is spell checked in every case. So we don't have to choose.

from fin-spell.

fluks avatar fluks commented on July 21, 2024

Every corner case should now be covered in the newest commit.

from fin-spell.

wapsi avatar wapsi commented on July 21, 2024

Yes, I agree with you. I think it's perfect now (or at least all my test cases were working just fine). Thanks!

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

from fin-spell.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.