Ticket #3448 (closed Bug: fixed)

Opened 6 years ago

Last modified 5 years ago

Images aren't selectable in Safari

Reported by: alfonsoml 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

3348.patch (1000 bytes) - added by garry.yao 6 years ago.
3448_2.patch (997 bytes) - added by garry.yao 5 years ago.
3448_3.patch (1.5 KB) - added by garry.yao 5 years ago.

Change History

comment:1 Changed 6 years ago by garry.yao

  • Keywords Confirmed added
  • Milestone set to CKEditor 3.0

comment:2 Changed 6 years ago by garry.yao

  • Owner set to garry.yao
  • Status changed from new to assigned

Changed 6 years ago by garry.yao

comment:3 Changed 6 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 follow-up: ↓ 6 Changed 5 years ago by garry.yao

  • Keywords Review? removed

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

Changed 5 years ago by garry.yao

comment:5 Changed 5 years ago by garry.yao

  • Keywords Review? added

comment:6 in reply to: ↑ 4 Changed 5 years ago by fredck

  • 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 5 years ago by garry.yao

comment:7 Changed 5 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 5 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:9 Changed 5 years ago by garry.yao

  • Status changed from assigned to closed
  • Resolution set to fixed

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

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