mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 352520. Backspace when deleting last char from URL bar crashes. Wallpaper fix for now. Patch by smontagu. r=aaronlev, sr=neil.
This commit is contained in:
parent
0a66a04657
commit
7ba88106fc
@ -4620,6 +4620,10 @@ nsEditor::DeleteSelectionImpl(nsIEditor::EDirection aAction)
|
||||
selection->GetFocusOffset(&deleteCharOffset);
|
||||
if (!deleteCharData) {
|
||||
nsCOMPtr<nsINode> parentNode(do_QueryInterface(deleteNode));
|
||||
PRUint32 childCount = parentNode->GetChildCount();
|
||||
// XXX Need to get correct info for backspace at end of text
|
||||
if (deleteCharOffset >= childCount)
|
||||
deleteCharOffset = childCount - 1;
|
||||
deleteNode = do_QueryInterface(parentNode->GetChildAt(deleteCharOffset));
|
||||
deleteCharData = do_QueryInterface(deleteNode);
|
||||
deleteCharOffset = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user