mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1431336. r=smaug a=abillings
--HG-- extra : rebase_source : 883af4d45ba7c29e1e67d22fc00d4442a3434fcc
This commit is contained in:
parent
35b53a22df
commit
8a6cab48a9
@ -868,7 +868,7 @@ TextInputListener::OnSelectionChange(Selection& aSelection,
|
||||
|
||||
mSelectionWasCollapsed = collapsed;
|
||||
|
||||
if (!weakFrame.IsAlive() ||
|
||||
if (!weakFrame.IsAlive() || !mFrame ||
|
||||
!nsContentUtils::IsFocusedContent(mFrame->GetContent())) {
|
||||
return;
|
||||
}
|
||||
@ -1712,8 +1712,9 @@ nsTextEditorState::SetSelectionRange(uint32_t aStart, uint32_t aEnd,
|
||||
props.SetEnd(aEnd);
|
||||
props.SetDirection(aDirection);
|
||||
} else {
|
||||
WeakPtr<nsTextEditorState> self(this);
|
||||
aRv = mBoundFrame->SetSelectionRange(aStart, aEnd, aDirection);
|
||||
if (aRv.Failed()) {
|
||||
if (aRv.Failed() || !self.get()) {
|
||||
return;
|
||||
}
|
||||
rv = mBoundFrame->ScrollSelectionIntoView();
|
||||
|
Loading…
Reference in New Issue
Block a user