mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix bug 406596 (Link/anchor elements are focused within an contentEditable element) for designMode. r/sr=jst.
This commit is contained in:
parent
6df492a17d
commit
e9ba9613cb
@ -3111,6 +3111,16 @@ nsGenericHTMLElement::RemoveFocus(nsPresContext *aPresContext)
|
||||
PRBool
|
||||
nsGenericHTMLElement::IsFocusable(PRInt32 *aTabIndex)
|
||||
{
|
||||
nsIDocument *doc = GetCurrentDoc();
|
||||
if (!doc || doc->HasFlag(NODE_IS_EDITABLE)) {
|
||||
// In designMode documents we only allow focusing the document.
|
||||
if (aTabIndex) {
|
||||
*aTabIndex = -1;
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
PRInt32 tabIndex = 0; // Default value for non HTML elements with -moz-user-focus
|
||||
GetTabIndex(&tabIndex);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user