Git Product home page Git Product logo

Comments (3)

adrianszymanski89 avatar adrianszymanski89 commented on June 20, 2024

Hi @jzju

Thank you for reporting this. I can confirm that this is a bug. I will report it internally for further investigation and will update this thread once we have it fixed.

from handsontable.

jzju avatar jzju commented on June 20, 2024

Changing

setPositionOnRightOfCursor() {
let left = this.#cursor.left;
if (this.#parentContainer) {
const { right: parentMenuRight } = this.#parentContainer.getBoundingClientRect();
// move the sub menu by the width of the parent's border (usually by 1-2 pixels)
left += this.#cursor.cellWidth + parentMenuRight - (this.#cursor.left + this.#cursor.cellWidth);
} else {
left += this.#offset.right;
}
this.#container.style.left = `${left}px`;
}
/**
* Sets the menu position on the left of the cursor object.
*/
setPositionOnLeftOfCursor() {
let left = this.#offset.left + this.#cursor.left - this.#container.offsetWidth;
if (this.#parentContainer) {
const { left: parentMenuLeft } = this.#parentContainer.getBoundingClientRect();
// move the sub menu by the width of the parent's border (usually by 1-2 pixels)
left -= this.#cursor.left - parentMenuLeft;
}
this.#container.style.left = `${left}px`;
}

to

setPositionOnRightOfCursor() {
    let left = _classPrivateFieldGet(_cursor, this).left;
    if (_classPrivateFieldGet(_parentContainer, this)) {
      left += _classPrivateFieldGet(_cursor, this).cellWidth;
    } else {
      left += _classPrivateFieldGet(_offset, this).right;
    }
    _classPrivateFieldGet(_container, this).style.left = `${left}px`;
  }

setPositionOnLeftOfCursor() {
    let left = _classPrivateFieldGet(_cursor, this).left - _classPrivateFieldGet(_container, this).offsetWidth;
    _classPrivateFieldGet(_container, this).style.left = `${left}px`;
  }

seems to fix it for my case but maybe it break other cases.

from handsontable.

adrianszymanski89 avatar adrianszymanski89 commented on June 20, 2024

Hi @jzju

Thank you for the update. I'm glad you could find the workaround, but yes, that might affect other parts of Handsontable. I hope we can fix the issue on our side soon.

from handsontable.

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.