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

IE iframe selection problem #2219

Closed
ftorr opened this issue Feb 5, 2014 · 5 comments
Closed

IE iframe selection problem #2219

ftorr opened this issue Feb 5, 2014 · 5 comments

Comments

@ftorr
Copy link

ftorr commented Feb 5, 2014

Hi there,

I'm using CodeMirror in an iFrame and the mouse selection does seems to work fine.

I've added to samples in the jsBin
http://jsbin.com/tuce/ -> Simple page with a iframe
http://jsbin.com/Unuyadoh/ --> page with the CodeMirror component.

Basically the problem is: if you scroll down to the last line in the editor and try to select all lines using the mouse, the top lines who aren't visible are not select, the scroll do not goes back to the first line.. also if you release the mouse out of the iFrame, the selection start behave funny.

I cannot remove the iframe isolation for now. This is only happening on Internet Explorer, I've test in the version 11. Also test on firefox and chrome and works fine.

Thanks

@marijnh
Copy link
Member

marijnh commented Feb 10, 2014

I do not see the problem in IE11/Win7 -- when I follow your instructions, selection seems to work fine (the editor scrolls up to the top as I drag, releasing the mouse button outside of the frame doesn't cause problems).

@ftorr
Copy link
Author

ftorr commented Feb 10, 2014

I asked other developer to test that and he reproduced the issue in IE11 and also IE10, I will test at home just to make sure ins't some network issue.
To test use this link http://jsbin.com/tuce/ as the second link doesn't have the iFrame and it is hard to reproduce..

I will update this later with the tests results at my home pc.
Thanks for the replay.

@ftorr ftorr closed this as completed Feb 10, 2014
@fpossenti
Copy link

I am the other developer stated above.

I confirm I can reproduce the problem on IE11, IE10 and also IE9.

With the URL [http://jsbin.com/tuce/] it happens all the time on all three browsers.
With the URL [http://jsbin.com/Unuyadoh/] it happens on IE11 and IE10 depending on where I drag the mouse (if I drag it over the "Forward" button it works, if I drag it over the address bar there's a 50% chance it won't work). Works on IE9.

marijnh added a commit that referenced this issue Feb 10, 2014
@marijnh
Copy link
Member

marijnh commented Feb 10, 2014

Attached patch should help with the problem of the selection going crazy. I have no idea how to fix the other problem (it is flaky, though to a lesser extent) in other browsers too. There is no way to know what the mouse is doing when it is outside of the frame that holds the editor.

@ftorr
Copy link
Author

ftorr commented Feb 11, 2014

Thanks, the patch makes the selection works much better, about the scroll issue I think we can leave with that for the time been.

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

3 participants