Bug 397219. Tab not moving focus relative to caret when caret inside label. r=mats, sr=neil, a=roc
git-svn-id: svn://10.0.0.236/trunk@239089 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
bec8bd992f
commit
d1299eb0db
@ -4982,17 +4982,7 @@ nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent,
|
||||
if (startContent) {
|
||||
startFrame = shell->GetPrimaryFrameFor(startContent);
|
||||
if (isCollapsed) {
|
||||
// First check to see if we're in a <label>
|
||||
// We don't want to return the selection in a label, because
|
||||
// we we should be tabbing relative to what the label
|
||||
// points to (the current focus), not relative to the label itself.
|
||||
nsIContent *parentContent = startContent;
|
||||
while ((parentContent = parentContent->GetParent()) != nsnull) {
|
||||
if (parentContent->Tag() == nsGkAtoms::label) {
|
||||
return NS_OK; // Don't return selection location, we're on a label
|
||||
}
|
||||
}
|
||||
// Next check to see if our caret is at the very end of a node
|
||||
// Check to see if our caret is at the very end of a node
|
||||
// If so, the caret is actually sitting in front of the next
|
||||
// logical frame's primary node - so for this case we need to
|
||||
// change caretContent to that node.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user