Opened 13 years ago

Last modified 13 years ago

#8338 confirmed Bug

Opera: link not inserted in correct position when we have image before cursor position (CORE-14592)

Reported by: Satya Minnekanti Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: IBM Opera Cc: Damian, Teresa Monahan, Hallvord R. M. Steen (Opera Software)

Description

To reproduce the defect:

  1. Open any CK Editor sample, type some text, insert a smiley or image and click on Link icon in the tool bar to open Link dialog.
  1. Enter the URL for the link and click OK button.

Expected Result: Link inserted after the smiley/Image

Actual Result: Link not inserted before the smiley/Image

Change History (4)

comment:1 Changed 13 years ago by Jakub Ś

Keywords: Opera added
Status: newconfirmed
Version: 3.0

I have checked issue under latest Opera 11.51.

I have opened replacebycode sample, clicked at the end of sample text in inserted a similey.
At that point cursor was blinking after smiley.
I clicked link, entered a text and pressed ok. The link was inserted before "sample" word. Please see code below:

<p>
	This is some <a href="http://mytest.com">http://mytest.com</a><strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.<img alt="smiley" height="20" src="http://192.168.1.100:8080/releases/ckeditor/3.6.1/ckeditor/plugins/smiley/images/regular_smile.gif" title="smiley" width="20" /></p>

comment:2 Changed 13 years ago by Frederico Caldeira Knabben

Cc: Hallvord R. M. Steen (Opera Software) added

comment:3 Changed 13 years ago by Hallvord R. M. Steen (Opera Software)

Also a problem when simply pressing enter after an image.

comment:4 Changed 13 years ago by Hallvord R. M. Steen (Opera Software)

Summary: Opera: link not inserted in correct position when we have image before cursor positionOpera: link not inserted in correct position when we have image before cursor position (CORE-14592)

The line break / link is not inserted after the IMG but before the first inline element in the paragraph. When the cursor is behind the image, the range offset is wrong when retrieving for example window.getSelection().getRangeAt(0).startOffset - an offset of 1 here means the first inline child in the paragraph, so when CKEditor tries to "restore" the selection/cursor position it gets things wrong.

Issue is now tracked as CORE-14592 on Opera's side.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy