Focus();
nsCOMPtr<nsIEventStateManager> esm; if (NS_OK == aPresContext->GetEventStateManager(getter_AddRefs(esm))) { esm->SetContentState(this, NS_EVENT_STATE_FOCUS); }
nsHTMLSelectElement::SetFocus(nsIPresContext* aPresContext){  nsIEventStateManager* esm;  if (NS_OK == aPresContext->GetEventStateManager(&esm)) {    esm->SetContentState(this, NS_EVENT_STATE_FOCUS);    NS_RELEASE(esm);  }  // XXX Should focus only this presContext  Focus();  nsIFormControlFrame* formControlFrame = nsnull;  nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);  if (NS_SUCCEEDED(rv)) {    formControlFrame->ScrollIntoView(aPresContext);  }  return rv;}