IE 8 error when usePreview is set to false and switching input to textarea #134

Closed
blookie opened this Issue Jan 18, 2013 · 2 comments

Projects

None yet

2 participants

@blookie
blookie commented Jan 18, 2013

Hi,

I've came across an error that I hope someone could shed some light on. I've set up a jsfiddle with usePreview set to false and autoAccept set to true. View http://jsfiddle.net/9GpcY/2/ in IE 8 (haven't got IE 9 to test to see if it happens on it too).

I have a text box and a textarea. When I click and type anything in the text box that's fine, when I then click on the textarea you can see IE 8 says there is an error on the page:

Message: Invalid argument.
Line: 1535
Char: 5
Code: 0
URI: http://mottie.github.com/Keyboard/js/jquery.keyboard.js

This line is: stored_range.moveToElementText(t);

The keyboard still performs fine even with the error. However, when testing in Visual Studio it constantly brings up an error notification (same as above), which can be quite frustrating.

Any ideas to get around this? (Note: No error occurs in Firefox or Chrome)

@Mottie
Owner
Mottie commented Jan 18, 2013

Hi @blookie!

Thanks for reporting this! I haven't run into this issue, but then I don't have an original IE8 to test it on. I'll have to look into this when I get a bit more time. Sorry =(

@blookie
blookie commented Jan 23, 2013

try {
stored_range.moveToElementText(t);
}
catch (error) { }

The error still exists, but at least now I don't get the error popup.

After a quick Google, it seems to be a fairly common issue with IE 8. This guy offered a bit of info on it: http://stackoverflow.com/questions/122546/what-to-do-when-ies-movetoelementtext-spits-out-an-invalid-argument-exception

@Mottie Mottie closed this in 11fb691 May 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment