-
Notifications
You must be signed in to change notification settings - Fork 35
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 8 Bug #7
Comments
https://github.com/timdown/rangyinputs/blob/master/rangyinputs-jquery-src.js#L161-L168 https://github.com/timdown/rangyinputs/blob/master/rangyinputs-jquery-src.js#L56-L63
|
This is by design. The selection offsets are relative to the value of the textarea in all cases. It does mean that offsets can vary between browsers but I think this is preferable to the alternative, which is having selection offsets that are relative to a string that isn't necessarily the same as the textarea's value and therefore needing to normalize the textarea's value before using the offsets. Having said that, I agree that it would be useful to be able to set a selection reliably with the same offsets in all browsers. I'm not sure what the best API for that is but I'll have a think and get back to you. |
sorry, jQuery Sorry, plz close this issue, and thanks for response ! p.s. If it can be normalize, it'll be great :) |
Firstly, thanks this awesome tool helping my day.
Here is a bug report, hopes it can help others.
In IE 8, the return object of
$().getSelection().text
is buggy.I found out the reason.
The reason is the new-line symbol in IE8 is
\r\n
and IE11 or FF or Chrome is\n
This makes
setSelection()
andgetSelection()
buggy.Thanks.
The text was updated successfully, but these errors were encountered: