Opened 8 years ago

Closed 8 years ago

#3448 closed Bug (fixed)

Images aren't selectable in Safari

Reported by: Alfonso Martínez de Lizarrondo Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.0
Component: General Version: SVN (CKEditor) - OLD
Keywords: Confirmed Review+ Cc:

Description

There's some specific code in V2 to handle this in fck_gecko.js (can't find right now the original ticket)

		this.EditorDocument.addEventListener( 'mousedown',
			function( ev )
			{
				var element = ev.srcElement ;

				if ( element.nodeName.IEquals( 'IMG', 'HR', 'INPUT', 'TEXTAREA', 'SELECT' ) )
				{
					FCKSelection.SelectNode( element ) ;
				}
			}, true ) ;

		this.EditorDocument.addEventListener( 'mouseup',
			function( ev )
			{
				if ( ev.srcElement.nodeName.IEquals( 'INPUT', 'TEXTAREA', 'SELECT' ) )
					ev.preventDefault()
			}, true ) ;

		this.EditorDocument.addEventListener( 'click',
			function( ev )
			{
				if ( ev.srcElement.nodeName.IEquals( 'INPUT', 'TEXTAREA', 'SELECT' ) )
					ev.preventDefault()
			}, true ) ;

Also the last functions take care of disabling the default behavior of those elements.

Attachments (3)

3348.patch (1000 bytes) - added by Garry Yao 8 years ago.
3448_2.patch (997 bytes) - added by Garry Yao 8 years ago.
3448_3.patch (1.5 KB) - added by Garry Yao 8 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by Garry Yao

Keywords: Confirmed added
Milestone: CKEditor 3.0

comment:2 Changed 8 years ago by Garry Yao

Owner: set to Garry Yao
Status: newassigned

Changed 8 years ago by Garry Yao

Attachment: 3348.patch added

comment:3 Changed 8 years ago by Garry Yao

Keywords: Review? added

Not sure if we need to have a directory in dtd for these control type element.

comment:4 Changed 8 years ago by Garry Yao

Keywords: Review? removed

The fix should also impact all other none-IE browser.

Changed 8 years ago by Garry Yao

Attachment: 3448_2.patch added

comment:5 Changed 8 years ago by Garry Yao

Keywords: Review? added

comment:6 in reply to:  4 Changed 8 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

This patch is breaking things on Firefox. I mean, the images selection is broken with it.

Other than that, this implementation is different from the solution we have in V2. That would be ok, if it would work properly. But, it makes it impossible to drag images now.

Please make a full test with all interested elements in all browsers.

Changed 8 years ago by Garry Yao

Attachment: 3448_3.patch added

comment:7 Changed 8 years ago by Garry Yao

Keywords: Review? added; Review- removed

My fault, I didn't take D&D into considering with the initial willing to simplify the hack here.
Sadly under Firefox, certain form controls e.g. 'checkbox' and 'radio' is still unselectable afer this patch, since these elements doesn't fire 'click'/'mousedown' at all, I guess we can hardly do anything with it due to this browser bug.

comment:8 Changed 8 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:9 Changed 8 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [3447]. Click here for more info about our SVN system.

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