Giter Site home page Giter Site logo

Comments (8)

rmarabini avatar rmarabini commented on May 23, 2024 2

Hi @trufa,

Finally I succeeded ;-).  Thanks for you help.

My problem was a little complicate because I do not use chessground but vue3-chessboard that wraps chessground. vue3-chessboard was based on chessground 8 which did not support the trustAllEvents flag. Luckily vue3-chessboard author was kind enough to update his package to chessground 9.

from chessground.

ornicar avatar ornicar commented on May 23, 2024

by design, we try to restrict interaction to legitimate human input with event.isTrusted:

if (!e.isTrusted || (e.button !== undefined && e.button !== 0)) return; // only touch or left click

from chessground.

trufa avatar trufa commented on May 23, 2024

@ornicar Oh nice! thanks! I'll try to disable it for testing! Thanks for the quick answer!

from chessground.

rmarabini avatar rmarabini commented on May 23, 2024

Hi @trufa,

Did you manage to send clicks using cypress?. I commented the line

if (!e.isTrusted || (e.button !== undefined && e.button !== 0)) return; // only touch or left click

but still not working

from chessground.

trufa avatar trufa commented on May 23, 2024

@rmarabini Yes I did!

I am not with a computer at the moment now, but you can check the project I'm working on in my profile.

Project is opening.expert and the latest branch is auth-ft. There I got it to work, remember to set the trust parameter to true in the latest version.

from chessground.

rmarabini avatar rmarabini commented on May 23, 2024

Hi @trufa,

Thanks for you help. Sorry for this, I guess, trivial question but... how do you set the trust parameter to true?

cheers

from chessground.

trufa avatar trufa commented on May 23, 2024

No worries, when you do your new instance, you pass as a option:

{
  ...
  trustAllEvents:true,
  ...
}

@rmarabini

from chessground.

trufa avatar trufa commented on May 23, 2024

@rmarabini awesome! if wrappers give you too much trouble, it's not too hard to make your own which you control.

from chessground.

Related Issues (20)

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.