﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2894	GetParentElement wrongly gives body sometimes for ff and webkit	Paul Moers		"GetParentElement in Firefox and webkit wrongly returns the body as parent element when the cursor is simply placed inside a div without an object selected or without the cursor in or bordering text (possibly only when there's no text in the div).

A fix is as following (code assumes to be inside a dialog):
{{{
var dialog = window.parent;
var editorWindow = dialog.InnerDialogLoaded();
var editorInstance = editorWindow.FCK;

selectedElement = editorWindow.FCKSelection.GetParentElement();
if (selectedElement.tagName.toLowerCase() == 'body' && editorInstance.EditorWindow.getSelection)
{
	var selection = editorInstance.EditorWindow.getSelection();
	selectedElement = selection.anchorNode;
}
}}}
"	Bug	closed	Normal		General	FCKeditor 2.6.4	wontfix		
