Comments (8)
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.
by design, we try to restrict interaction to legitimate human input with event.isTrusted
:
Line 23 in 9a5ed44
from chessground.
@ornicar Oh nice! thanks! I'll try to disable it for testing! Thanks for the quick answer!
from chessground.
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.
@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.
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.
No worries, when you do your new instance, you pass as a option:
{
...
trustAllEvents:true,
...
}
from chessground.
@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)
- cg-container causes my sizes to be messed up HOT 3
- Error on analysis board HOT 1
- Detect any click on the board HOT 2
- More premoves HOT 1
- Drawable OnChange + Immer.js | Object is not extensible
- Pgn file download is missing extension HOT 1
- callback on square click HOT 2
- Accessability HOT 2
- Not possible to set custom premove squares
- display check *after* piece animation finishes
- Allow custom classes applied to custom squares HOT 1
- Arrow doesn't snap to valid move after mouse re-enters DOM HOT 1
- How to implement piece drag and drop feature like https://lichess.org/editor? HOT 2
- Error `Could not resolve "./package.json"` on v9.0.1 HOT 1
- Premove doesn't make a sound
- Support React chessboard implementation officially, no third party HOT 1
- Possible to drag and drop pieces off the board? HOT 4
- Click HOT 3
- [QUESTION] Is it possible to allow a player to move twice?
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 chessground.