Index: FCKeditor/trunk/_whatsnew.html
===================================================================
--- FCKeditor/trunk/_whatsnew.html	(revision 1729)
+++ FCKeditor/trunk/_whatsnew.html	(revision 1730)
@@ -95,4 +95,7 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1853">#1853</a>] Setting
 			ShiftEnterMode to p or div now works correctly when EnterMode is br.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1838">#1838</a>] Fixed the
+			issue where context menus sometimes don't disappear after selecting an option.
+			</li>
 	</ul>
 	<h3>
Index: FCKeditor/trunk/editor/_source/classes/fckpanel.js
===================================================================
--- FCKeditor/trunk/editor/_source/classes/fckpanel.js	(revision 1729)
+++ FCKeditor/trunk/editor/_source/classes/fckpanel.js	(revision 1730)
@@ -271,17 +271,17 @@
 			} ) ;
 
+		// Move the focus to the IFRAME so we catch the "onblur".
+		this._IFrame.contentWindow.focus() ;
+		this._IsOpened = true ;
+
 		var me = this ;
-		var resizeFunc = function()
-		{
-			var iWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ;
-			var iHeight = eMainNode.offsetHeight ;
-			me._IFrame.width = iWidth ;
-			me._IFrame.height = iHeight ;
-
-			// Move the focus to the IFRAME so we catch the "onblur".
-			me._IFrame.contentWindow.focus() ;
-			me._IsOpened = true ;
-		}
-		setTimeout( resizeFunc, 1 ) ;
+		this._resizeTimer = setTimeout( function()
+			{
+				var iWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ;
+				var iHeight = eMainNode.offsetHeight ;
+				me._IFrame.width = iWidth ;
+				me._IFrame.height = iHeight ;
+
+			}, 0 ) ;
 
 		FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel = this ;
@@ -309,4 +309,10 @@
 
 		this._IsOpened = false ;
+
+		if ( this._resizeTimer ) 
+		{ 
+			clearTimeout( this._resizeTimer ) ; 
+			this._resizeTimer = null ; 
+		} 
 
 		if ( this.ParentPanel )
