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

iframe has scrolling="no" #115

Open
serapath opened this issue Jun 21, 2016 · 2 comments
Open

iframe has scrolling="no" #115

serapath opened this issue Jun 21, 2016 · 2 comments

Comments

@serapath
Copy link

serapath commented Jun 21, 2016

We use requirebin to teach some young folks javascript.
When the preview iframe visualizes a lot of things, it would be nice if it was scrollable.
Is the scrolling="no" on purpose?

I guess it is happening here:

@max-mapper
Copy link
Owner

i think the idea was when you embed it, it is weird if when you scroll down the page the iframe captures your scroll action from the parent page. but i can see the use case for it being disabled, we could have a querystring option that sets scrollingDisabled: false maybe?

@serapath
Copy link
Author

that would be great :-)
We were manually copy&pasting to the dev tools to enable the wished for behavior.

document.querySelector('.play-button').addEventListener('click', function (event) {
  setTimeout(function () {
    var iframe = document.querySelector('iframe')
    var parent = iframe.parentElement
    parent.removeChild(iframe)
    iframe.setAttribute('scrolling', 'yes')
    parent.appendChild(iframe)
  }, 500)
})

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

No branches or pull requests

2 participants