зеркало из https://github.com/mozilla/gecko-dev.git
Bug 847983 - Try harder to get a valid frame; r=masayuki
This commit is contained in:
Родитель
a561761877
Коммит
c5b7998cc2
|
@ -106,6 +106,9 @@ nsContentEventHandler::Init(nsQueryContentEvent* aEvent)
|
|||
|
||||
nsRect r;
|
||||
nsIFrame* frame = caret->GetGeometry(mSelection, &r);
|
||||
if (!frame) {
|
||||
frame = mRootContent->GetPrimaryFrame();
|
||||
}
|
||||
NS_ENSURE_TRUE(frame, NS_ERROR_FAILURE);
|
||||
|
||||
aEvent->mReply.mFocusedWidget = frame->GetNearestWidget();
|
||||
|
|
Загрузка…
Ссылка в новой задаче