Ticket #8338 (confirmed Bug)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: satya Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: IBM Opera Cc: damo, tmonahan, hallvord@…

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

comment:1 Changed 3 years ago by j.swiderski

  • Keywords Opera added
  • Status changed from new to confirmed
  • Version set to 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 3 years ago by fredck

  • Cc hallvord@… added

comment:3 Changed 2 years ago by hallvord@…

Also a problem when simply pressing enter after an image.

comment:4 Changed 2 years ago by hallvord@…

  • Summary changed from Opera: link not inserted in correct position when we have image before cursor position to Opera: 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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy