Fix for caret problems in Ender text fields. r=saari

This commit is contained in:
hyatt%netscape.com 1999-12-08 20:55:45 +00:00
Родитель 5b5d567b93
Коммит 9f336df5c0
2 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -194,6 +194,14 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
break;
case NS_GOTFOCUS:
{
if (!mDocument) {
nsCOMPtr<nsIPresShell> presShell;
aPresContext->GetShell(getter_AddRefs(presShell));
if (presShell) {
presShell->GetDocument(&mDocument);
}
}
if (gLastFocusedDocument == mDocument)
break;
@ -221,14 +229,6 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
focusevent.eventStructType = NS_EVENT;
focusevent.message = NS_FOCUS_CONTENT;
if (!mDocument) {
nsCOMPtr<nsIPresShell> presShell;
aPresContext->GetShell(getter_AddRefs(presShell));
if (presShell) {
presShell->GetDocument(&mDocument);
}
}
if (mDocument) {
// fire focus on window, not document
nsCOMPtr<nsIScriptGlobalObject> globalObject;

Просмотреть файл

@ -194,6 +194,14 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
break;
case NS_GOTFOCUS:
{
if (!mDocument) {
nsCOMPtr<nsIPresShell> presShell;
aPresContext->GetShell(getter_AddRefs(presShell));
if (presShell) {
presShell->GetDocument(&mDocument);
}
}
if (gLastFocusedDocument == mDocument)
break;
@ -221,14 +229,6 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
focusevent.eventStructType = NS_EVENT;
focusevent.message = NS_FOCUS_CONTENT;
if (!mDocument) {
nsCOMPtr<nsIPresShell> presShell;
aPresContext->GetShell(getter_AddRefs(presShell));
if (presShell) {
presShell->GetDocument(&mDocument);
}
}
if (mDocument) {
// fire focus on window, not document
nsCOMPtr<nsIScriptGlobalObject> globalObject;