git-svn-id: svn://10.0.0.236/trunk@143376 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jkeiser%netscape.com
2003-06-06 01:11:57 +00:00
parent ac5c47c624
commit 6353249b1a
2 changed files with 16 additions and 34 deletions

View File

@@ -2994,25 +2994,16 @@ nsListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
} else {
// NOTE: the combo box is responsible for dropping it down
if (mComboboxFrame) {
nsCOMPtr<nsIEventStateManager> stateManager;
if (NS_SUCCEEDED(mPresContext->GetEventStateManager(getter_AddRefs(stateManager)))) {
nsIFrame * frame;
stateManager->GetEventTarget(&frame);
if (!IsClickingInCombobox(aMouseEvent)) {
return NS_OK;
}
// This will consume the focus event we get from the clicking on the dropdown
//stateManager->ConsumeFocusEvents(PR_TRUE);
if (!IsClickingInCombobox(aMouseEvent)) {
return NS_OK;
}
PRBool isDroppedDown;
mComboboxFrame->IsDroppedDown(&isDroppedDown);
mComboboxFrame->ShowDropDown(!isDroppedDown);
// Reset focus on main webshell here
//stateManager->SetContentState(mContent, NS_EVENT_STATE_FOCUS);
PRBool isDroppedDown;
mComboboxFrame->IsDroppedDown(&isDroppedDown);
mComboboxFrame->ShowDropDown(!isDroppedDown);
if (isDroppedDown) {
CaptureMouseEvents(mPresContext, PR_FALSE);
}
if (isDroppedDown) {
CaptureMouseEvents(mPresContext, PR_FALSE);
}
}
}

View File

@@ -2994,25 +2994,16 @@ nsListControlFrame::MouseDown(nsIDOMEvent* aMouseEvent)
} else {
// NOTE: the combo box is responsible for dropping it down
if (mComboboxFrame) {
nsCOMPtr<nsIEventStateManager> stateManager;
if (NS_SUCCEEDED(mPresContext->GetEventStateManager(getter_AddRefs(stateManager)))) {
nsIFrame * frame;
stateManager->GetEventTarget(&frame);
if (!IsClickingInCombobox(aMouseEvent)) {
return NS_OK;
}
// This will consume the focus event we get from the clicking on the dropdown
//stateManager->ConsumeFocusEvents(PR_TRUE);
if (!IsClickingInCombobox(aMouseEvent)) {
return NS_OK;
}
PRBool isDroppedDown;
mComboboxFrame->IsDroppedDown(&isDroppedDown);
mComboboxFrame->ShowDropDown(!isDroppedDown);
// Reset focus on main webshell here
//stateManager->SetContentState(mContent, NS_EVENT_STATE_FOCUS);
PRBool isDroppedDown;
mComboboxFrame->IsDroppedDown(&isDroppedDown);
mComboboxFrame->ShowDropDown(!isDroppedDown);
if (isDroppedDown) {
CaptureMouseEvents(mPresContext, PR_FALSE);
}
if (isDroppedDown) {
CaptureMouseEvents(mPresContext, PR_FALSE);
}
}
}