Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handsontable won't work inside an iframe when initialized outside of it #5686

Closed
wojciechczerniak opened this issue Dec 20, 2018 · 2 comments

Comments

@wojciechczerniak
Copy link
Contributor

Description

Handsontable doesn't work when created in an iframe document of a document that it has been loaded into.

The proposed fix is to use document (ownerDocument) of passed .H wrapper, rather than to rely on global document variable.

Steps to reproduce

  1. Create an <iframe> with Handsontable container inside
  2. Initialize Handsontable on that container
  3. Check console for error

Demo

https://codepen.io/jacekbogdanski/pen/pqEaOY

Your environment

  • Handsontable version: 6.2.2
  • Browser Name and version: Firefox
  • Operating System: OSX
@marek-baranowski
Copy link

+1

I would really appreciate having this fixed as this is a blocker - we have to use Handsontable inside an iframe.

mrpiotr-dev added a commit that referenced this issue Jan 11, 2019
…ument in Walkontable, editors and several plugins. #5686
mrpiotr-dev added a commit that referenced this issue Jan 15, 2019
mrpiotr-dev added a commit that referenced this issue Jan 25, 2019
mrpiotr-dev pushed a commit that referenced this issue Jan 25, 2019
* WIP. Should be able to initialize Handsontable in iframe. #5686

* WIP. Removing globals (window, document) from code. #5686

* WIP. Replacement of window and document with defaultView and ownerDocument in Walkontable, editors and several plugins. #5686

* WIP. Rest of plugins + renderers. #5686

* WIP. Tweaks and changes to run HOT in iframe without errors. #5686

* Changed: helpers names, window/document as a context as the last argument in helpers. #5686

* Final changes and tweaks before CR. #5686

* Changes after the CR - added missing arguments. #5686

* Update src/helpers/feature.js

Co-Authored-By: swistach <swistach@users.noreply.github.com>

* Changes after CR + added ts definitions. #5686

* Changes after CR: tweak for getting scrollable element. #5686

* Small adjustments after CR. Changed getScrollableElement. Removed comment from overlay/_base. #5686
@AMBudnik
Copy link
Contributor

AMBudnik commented Mar 6, 2019

@marek-baranowski just released it in v 7.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants