Opened 9 years ago

Last modified 8 years ago

#5027 confirmed Bug

[IE] Standards Mode Selection: Cannot click to select to the right of a control node

Reported by: Scott McNaught Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: IE8 HasPatch Cc:

Description

There is a bug with IE in standards mode when trying to click to the right of a control selectable node such as an image.

To replicate Set the HTML to:

<p>
	Line 1<br />
	Line 2<img src="http://www.google.com/intl/en_ALL/images/logo.gif" /></p>

I have attached a patch which fixes this problem. I dont know if it is implemented up to your standards though.

Some things that are bad about my patch are:

  • Its using the CK dom range inside selection (seems a bit cyclic)
  • You cannot mouse down and drag to select more
  • I dont really understand why there are multiple selections / ranges so I have just used "getRanges()[0]"
  • Its using setTimeout() because the selection is not ready before the event
  • I am using a constant of 20x20 pixels to check the mouse offset - perhaps a character size calculation is needed?

There may be some other ways to fix this. Another idea is that we could insert a whitespace text node / span at the end of the block before the end of the mousedown event.

Cheers,
Scott
http://www.synergy8.com/

Attachments (1)

ieselection_right_controlnode.patch (2.0 KB) - added by Scott McNaught 9 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 9 years ago by Frederico Caldeira Knabben

Keywords: Confirmed IE8 HasPatch added
Milestone: CKEditor 3.x

I was able to confirm it with IE8 only.

comment:2 Changed 9 years ago by Scott McNaught

Sorry I have no way to test IE7 atm, so not sure with that.

I also noticed theres a related issue where you cannot have the image selected and press the right arrow key to move the caret to the right. Perhaps when a control node is selected and right arrow is pressed, we should just move the selection to after the end of that node via code?

Also, before adding this patch, I suggest adding a check on the doctype. I dont beleive there is a need to do this for quirks mode.

Also updated patch to fix a bug where the block was null.

comment:3 Changed 9 years ago by Scott McNaught

Updated patch to fix an issue when startContainer is not a text node.

comment:4 Changed 9 years ago by Scott McNaught

Updated patch to fix another bug and also added a non quirks mode checck.

Changed 9 years ago by Scott McNaught

comment:5 Changed 9 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:6 Changed 8 years ago by Wiktor Walc

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