Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-06-17 16:15:30 +08:00
commit a2f81bc791
18 changed files with 202 additions and 8 deletions

View file

@ -2236,11 +2236,20 @@ nsListControlFrame::KeyDown(nsIDOMEvent* aKeyEvent)
return NS_OK;
}
// We don't want to preventDefault for escape key if the dropdown
// popup is not shown.
// Need to do the check before AboutToRollup because AboutToRollup
// may update the dropdown flags.
bool doPreventDefault =
!mComboboxFrame || mComboboxFrame->IsDroppedDownOrHasParentPopup();
AboutToRollup();
// If the select element is a dropdown style, Enter key should be
// If the select element is a dropdown style, Escape key should be
// consumed everytime since Escape key may be pressed accidentally after
// the dropdown is closed by Escepe key.
aKeyEvent->PreventDefault();
if (doPreventDefault) {
aKeyEvent->PreventDefault();
}
return NS_OK;
}
case NS_VK_PAGE_UP: {

View file

@ -320,6 +320,8 @@
position: fixed;
top: 0; left: 0;
right: 0; bottom: 0;
/* This prevents undesired interactions with the selection code. */
-moz-user-select: none;
}
*|*:-moz-full-screen:not(:root)::backdrop {