Opened 16 years ago

Closed 16 years ago

Last modified 14 years ago

#1994 closed Bug (worksforme)

Opera: ctrl-b twice will output bold text

Reported by: Hallvord R. M. Steen (Opera Software) Owned by:
Priority: Normal Milestone: Opera Compatibility
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Opera Cc:

Description

Place cursor in non-bold text

Press ctrl-b. Bold button on toolbar goes to "depressed" state (expected)

Press ctrl-b again. Bold button goes back to normal

Type. You get bold text - not expected.

Second ctrl-b press isn't correctly cancelled by the editor, so Opera picks it up and sets its internal state to "output bold text" even though FCKEditor removes the B tag from the DOM. The editor should make sure the keypress or keydown is cancelled also after the "remove empty B tag" operation.

Change History (4)

comment:1 Changed 16 years ago by Hallvord R. M. Steen (Opera Software)

Version: SVN

Likely caused by this JS error during key events handling:

JavaScript - http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default
Event thread: keydown
Error:
name: TypeError
message: Statement on line 660: Cannot convert undefined or null to Object
Backtrace:
  Line 660 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/classes/fckdomrange.js
    							if ( oNode != oNode.parentNode.lastChild )
  Line 284 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/classes/fckstyle.js
    		range.Expand( 'inline_elements' ) ;
  Line 137 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/classes/fckstyle.js
    		this.RemoveFromRange( range, true ) ;
  Line 52 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/internals/fckstyles.js
    			style.RemoveFromSelection( FCK.EditorWindow ) ;
  Line 42 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/commandclasses/fckcorestylecommand.js
    			FCKStyles.RemoveStyle( this.StyleName ) ;
  ...  Line 1009 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/internals/fck.js: In function _FCK_KeystrokeHandler_OnKeystroke
    	return ( oCommand.Execute.apply( oCommand, FCKTools.ArgumentsToArray( arguments, 2 ) ) !== false ) ;
  ...  Line 106 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/classes/fckkeystrokehandler.js: In function _FCKKeystrokeHandler_OnKeyDown
    		if ( keystrokeValue === true || !( keystrokeHandler.OnKeystroke && keystrokeHandler.OnKeystroke.apply( keystrokeHandler, keystrokeValue ) ) )
  ...  Line 179 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js
    			listener.apply( sourceObject, [ e ].concat( paramsArray || [] ) ) ;
  ...
stacktrace:   ...  Line 284 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/classes/fckstyle.js
    		range.Expand( 'inline_elements' ) ;
  Line 137 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/classes/fckstyle.js
    		this.RemoveFromRange( range, true ) ;
  Line 52 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/internals/fckstyles.js
    			style.RemoveFromSelection( FCK.EditorWindow ) ;
  Line 42 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/commandclasses/fckcorestylecommand.js
    			FCKStyles.RemoveStyle( this.StyleName ) ;
  ...  Line 1009 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/internals/fck.js: In function _FCK_KeystrokeHandler_OnKeystroke
    	return ( oCommand.Execute.apply( oCommand, FCKTools.ArgumentsToArray( arguments, 2 ) ) !== false ) ;
  ...  Line 106 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/classes/fckkeystrokehandler.js: In function _FCKKeystrokeHandler_OnKeyDown
    		if ( keystrokeValue === true || !( keystrokeHandler.OnKeystroke && keystrokeHandler.OnKeystroke.apply( keystrokeHandler, keystrokeValue ) ) )
  ...  Line 179 of linked script http://t.test/libraries%20and%20applications/fckeditor/FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js
    			listener.apply( sourceObject, [ e ].concat( paramsArray || [] ) ) ;
  ...

comment:2 Changed 16 years ago by Wojciech Olchawa

Keywords: Confirmed Opera added

comment:3 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: worksforme
Status: newclosed

WFM with Opera build 9972.

comment:4 Changed 14 years ago by Krzysztof Studnik

DUP of #4657

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