-
Notifications
You must be signed in to change notification settings - Fork 410
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
Doesn't work well with iframes #30
Comments
A workaround for this is adding an overlay to cover the whole iframe so that it will catch all mouse events. SplitPane {},
div
className: 'left-pane'
'content'
div
className: 'right-pane',
div
id: 'overlay'
iframe If your iframe doesn't have any clickable areas you should be all set at this point.
document.addEventListener 'mouseup', ->
document.getElementById('overlay').style.display = 'none'
SplitPane
onChange: ->
document.getElementById('overlay').style.display = 'block'
,
div
className: 'left-pane'
'content'
div
className: 'right-pane',
div
id: 'overlay'
iframe Hope this helps. |
With suggested pull request #37 the above code could be changed to: SplitPane
onChange: ->
document.getElementById('overlay').style.display = 'block'
onDragFinished: ->
document.getElementById('overlay').style.display = 'none'
,
div
className: 'left-pane'
'content'
div
className: 'right-pane',
div
id: 'overlay'
iframe |
Here's an example of how I got it work:
|
The only problem with the above solution is that it doesn't allow you to scroll with just your mouse afterwards. If you click on the iFrame though, then you can scroll. Let me know if you have ideas on how to fix that problem. |
Works wonders! Thanks @NathanBWaters ! |
@NathanBWaters so this is definitely a chrome bug (that re-enabling pointer-events after disabling does not restore proper behavior for an iframe child). was running into the same problem, tested on firefox and it works as expected. issued a bug report upstream with a minimal example (http://bit.ly/2hhatch) |
Still having issues when using iframe. Any help? Thanks |
this fork works well with iframes: https://github.com/quarkw/react-split-pane |
If I try to embed iframes in the split panes the dragging doesnt work very well. As soon as the mouse enters the iframe it stops dragging. Is there any way to fix this?
Regards
The text was updated successfully, but these errors were encountered: