Bug 847983 - Try harder to get a valid frame; r=masayuki

This commit is contained in:
Jim Chen 2013-04-04 12:30:00 -04:00
Родитель a561761877
Коммит c5b7998cc2
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -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();