Chessboard.js not working with F7

I am trying to make Chessboard.js work with F7 (vanilla JS, bundle CSS & JS) on Cordova (Browser/Android), the following issues are driving me crazy:

  1. The piece disappear on click (solved with display: block !important; in the piece class.).
  2. The animation(fron Chessboard.js) doesnt work loading new positions.
  3. During drag and drop the piece disappear during the drag and show off on drop.

Commenting F7 CSS the animation + drag and drop works but the piece doesnt disappear from start position during drag.

Any help is very welcome.
I manage to make it work with Jquery Mobile, but F7 has many extra features and is under development.

Would be good to see some more complete live example or maybe GitHub demo repo. But i tried to implement it in JSFiddle and in general it works

This is an example with pieces, that shows the behaviour.

With the hack to avoid piece disappearing on click.

.piece-417db {
display: block !important;

I saw in the developer tools at some point when start dragging thet display:none shows.

I suspect that some !important declaration is overwriting the chessboard.css behaviour.

This is actually the correct style that should be added:

.piece-417db {
  z-index: 10000!important;

Except this i can see everything works

This is the video:

Content of the Chess page:

<div class="page" data-name="about">
  <div class="navbar">
    <div class="navbar-bg"></div>
    <div class="navbar-inner sliding">
      <div class="left">
        <a href="#" class="link back">
          <i class="icon icon-back"></i>
          <span class="if-not-md">Back</span>
      <div class="title">Chess</div>
      <div class="right">
        <a href="#" class="link" @click="doSomething">Shuffle</a>
  <div class="page-content">
    <div id="board"></div>
export default {
  methods: {
    doSomething() {
        a4: 'bK',
        c4: 'wK',
        a7: 'wR'
  on: {
    pageInit() {
      this.board = Chessboard('board', {
        draggable: true,
        dropOffBoard: 'trash',
        sparePieces: true,
        pieceTheme: 'static/chessboardjs/img/chesspieces/wikipedia/{piece}.png'

Assuming you included Chessboard JS, CSS + jQuery

Oh my dear lord, it did the magic, very very happy to stick with F7 for this project. you make my day. no doubt about

1 Like