Opened 11 years ago

Closed 11 years ago

#3361 closed Bug (wontfix)

[FF] createBookmark problem with multi-ranges

Reported by: Garry Yao Owned by:
Priority: Normal Milestone: CKEditor 3.0
Component: General Version:
Keywords: Firefox Confirmed Cc:

Description

If a selection contains multiple ranges, now invoke selection.createBookmarks(), if the ranges were overlapped with each other, then the bookmarked range will right correct.
Try the following selection in FF:

<table>
    <tbody>
        [
        <tr>
            <td>
                cell1
            </td>
            <td>
                cell2
            </td>
        </tr>]
    </tbody>
</table>

FF will translate it into multi-ranges as:

<table>	
    <tbody>
        <tr>
            ^<td>
                cell1
            </td>^
            ^<td>
                cell2
            </td>^
        </tr>
    </tbody>
</table>

Now the bookmark nodes creation on every range will interfere with each other, resulting in incorrect bookmark positions.

Change History (4)

comment:1 Changed 11 years ago by Garry Yao

Keywords: Firefox added
Summary: createBookmark problem with multi-ranges[FF] createBookmark problem with multi-ranges

Since other browser doesn't support multi-ranges, this should be FF only.

comment:2 Changed 11 years ago by Garry Yao

See #3475 as a concrete bug of this.

comment:3 Changed 11 years ago by Frederico Caldeira Knabben

So here again, it looks like it's enough to loop through the ranges from last to first, instead of first to last, when creating the bookmarks. Just my intuition though.

comment:4 Changed 11 years ago by Garry Yao

Resolution: wontfix
Status: newclosed

See #3475 for a practical way to avoid this problem.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy