Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Need to fix "setRng" function. TinyMCE JavaScript error in Opera (getRangeAt, INDEX_SIZE_ERR). #77

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant

XP1 commented Jul 21, 2011

Need to fix "setRng" function.

TinyMCE JavaScript error in Opera (getRangeAt, INDEX_SIZE_ERR):
http://my.opera.com/XP1/blog/2011/07/21/tinymce-javascript-error-in-opera-getrangeat-index-size-err

What are your thoughts?

EDIT: Fixed my spaces into tabs.

Need to fix "setRng" function.
TinyMCE JavaScript error in Opera (getRangeAt, INDEX_SIZE_ERR):
http://my.opera.com/XP1/blog/2011/07/21/tinymce-javascript-error-in-opera-getrangeat-index-size-err

What are your thoughts?

EDIT: Fixed my spaces into tabs.

XP1 commented Jul 22, 2011

This TinyMCE bug was previously reported from at least 2011-04-14, yet has not been fixed (until now, hopefully). See TinyMCE bug reports #4306 and #4372 (duplicate).

XP1 commented Dec 17, 2011

TL;DR: Bug is fixed.

Jason Frame's bug fix, on November 08, 2011, recognized for Webkit browsers, also fixes the bug in Opera.

Fix exception in setRng for webkit browser where adding range isn't successful and causes an exception setting the selected range:
https://github.com/tinymce/tinymce/blob/347623591030c58bd06fd60c597dac93372d1921/jscripts/tiny_mce/classes/dom/Selection.js

Jason Frame's bug fix does what I did, in a similar fashion, by checking rangeCount to avoid an exception.
"t.selectedRange = s.rangeCount > 0 ? s.getRangeAt(0) : null;"

@XP1 XP1 closed this Dec 17, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment