v1.0
只读模式 group, 分享 评论更多问题 博客标签总是存在一个
This commit is contained in:
32
public/tinymce/classes/dom/TridentSelection.js
Normal file → Executable file
32
public/tinymce/classes/dom/TridentSelection.js
Normal file → Executable file
@ -163,15 +163,17 @@ define("tinymce/dom/TridentSelection", [], function() {
|
||||
|
||||
// Find the text node and offset
|
||||
while (sibling) {
|
||||
nodeValue = sibling.nodeValue;
|
||||
textNodeOffset += nodeValue.length;
|
||||
if (sibling.nodeType == 3) {
|
||||
nodeValue = sibling.nodeValue;
|
||||
textNodeOffset += nodeValue.length;
|
||||
|
||||
// We are at or passed the position we where looking for
|
||||
if (textNodeOffset >= offset) {
|
||||
container = sibling;
|
||||
textNodeOffset -= offset;
|
||||
textNodeOffset = nodeValue.length - textNodeOffset;
|
||||
break;
|
||||
// We are at or passed the position we where looking for
|
||||
if (textNodeOffset >= offset) {
|
||||
container = sibling;
|
||||
textNodeOffset -= offset;
|
||||
textNodeOffset = nodeValue.length - textNodeOffset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sibling = sibling.nextSibling;
|
||||
@ -196,13 +198,15 @@ define("tinymce/dom/TridentSelection", [], function() {
|
||||
}
|
||||
|
||||
while (sibling) {
|
||||
textNodeOffset += sibling.nodeValue.length;
|
||||
if (sibling.nodeType == 3) {
|
||||
textNodeOffset += sibling.nodeValue.length;
|
||||
|
||||
// We are at or passed the position we where looking for
|
||||
if (textNodeOffset >= offset) {
|
||||
container = sibling;
|
||||
textNodeOffset -= offset;
|
||||
break;
|
||||
// We are at or passed the position we where looking for
|
||||
if (textNodeOffset >= offset) {
|
||||
container = sibling;
|
||||
textNodeOffset -= offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sibling = sibling.previousSibling;
|
||||
|
Reference in New Issue
Block a user