Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 4533)
+++ /CKEditor/trunk/CHANGES.html	(revision 4534)
@@ -77,4 +77,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4603">#4603</a> : Fixed unable to disable submenu items in contextmenu.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4672">#4672</a> : Fixed unable to redo the insertion of horizontal line.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4677">#4677</a> : Fixed 'Tab' key is trapped by hidden dialog elements.</li>
 	<h3>
 		CKEditor 3.0.1</h3>
Index: /CKEditor/trunk/_source/core/dom/element.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/element.js	(revision 4533)
+++ /CKEditor/trunk/_source/core/dom/element.js	(revision 4534)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -740,5 +740,22 @@
 		isVisible : function()
 		{
-			return this.$.offsetWidth && ( this.$.style.visibility != 'hidden' );
+			var isVisible = !!this.$.offsetHeight && this.getComputedStyle( 'visibility' ) != 'hidden',
+				elementWindow,
+				elementWindowFrame;
+
+			// Webkit and Opera report non-zero offsetHeight despite that
+			// element is inside an invisible iframe. (#4542)
+			if ( isVisible && ( CKEDITOR.env.webkit || CKEDITOR.env.opera ) )
+			{
+				elementWindow = this.getWindow();
+
+				if ( !elementWindow.equals( CKEDITOR.document.getWindow() )
+						&& ( elementWindowFrame = elementWindow.$.frameElement ) )
+				{
+					isVisible = new CKEDITOR.dom.element( elementWindowFrame ).isVisible();
+				}
+			}
+
+			return isVisible;
 		},
 
Index: /CKEditor/trunk/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 4533)
+++ /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 4534)
@@ -465,5 +465,5 @@
 		this.isFocusable = function()
 		{
-			return true;
+			return !( element.getAttribute( 'disabled' ) || !element.isVisible() )
 		};
 		this.focus = function()
@@ -2461,17 +2461,5 @@
 		isVisible : function()
 		{
-			var element = this.getInputElement(),
-				elementWindow = element.getWindow(),
-				elementFrame,
-				isVisible = !!element.$.offsetHeight;
-
-			// Webkit and Opera report non-zero offsetHeight despite that
-			// element is inside an invisible iframe. (#4542)
-			if( isVisible && ( CKEDITOR.env.webkit || CKEDITOR.env.opera )
-				&& !elementWindow.equals( CKEDITOR.document.getWindow() )
-				&& ( elementFrame = elementWindow.$.frameElement ) )
-				isVisible = !!elementFrame.offsetHeight;
-
-			return isVisible;
+			return this.getInputElement().isVisible();
 		},
 
Index: /CKEditor/trunk/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialogui/plugin.js	(revision 4533)
+++ /CKEditor/trunk/_source/plugins/dialogui/plugin.js	(revision 4534)
@@ -839,5 +839,5 @@
 				isVisible : function()
 				{
-					return !!this.getElement().$.firstChild.offsetHeight;
+					return this.getElement().getFirst().isVisible();
 				},
 
