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

Projects
None yet
4 participants
@wojciechczerniak
Copy link
Member

wojciechczerniak commented Dec 20, 2018

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

This comment has been minimized.

Copy link

marek-baranowski commented Dec 28, 2018

+1

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

swistach added a commit that referenced this issue Jan 8, 2019

swistach added a commit that referenced this issue Jan 10, 2019

swistach added a commit that referenced this issue Jan 11, 2019

WIP. Replacement of window and document with defaultView and ownerDoc…
…ument in Walkontable, editors and several plugins. #5686

swistach added a commit that referenced this issue Jan 14, 2019

swistach added a commit that referenced this issue Jan 15, 2019

swistach added a commit that referenced this issue Jan 15, 2019

swistach added a commit that referenced this issue Jan 17, 2019

@swistach swistach referenced this issue Jan 17, 2019

Merged

Handsontable should work properly in <iframe> #5723

1 of 1 task complete

swistach added a commit that referenced this issue Jan 17, 2019

swistach added a commit that referenced this issue Jan 18, 2019

swistach added a commit that referenced this issue Jan 21, 2019

swistach added a commit that referenced this issue Jan 23, 2019

swistach added a commit that referenced this issue Jan 25, 2019

swistach added a commit that referenced this issue Jan 25, 2019

Handsontable should work properly in <iframe> (#5723)
* 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

@swistach swistach referenced this issue Jan 28, 2019

Merged

Update element.js to use relative document #5744

1 of 1 task complete
@AMBudnik

This comment has been minimized.

Copy link
Contributor

AMBudnik commented Mar 6, 2019

@marek-baranowski just released it in v 7.0.0

@AMBudnik AMBudnik closed this Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.