Files
sousa-gecko/layout/forms/test/bug536567_subframe.html
T
Oliver Medhurst cbcf563dc9 Bug 1877969 - Consume user activation when showing any picker r=dom-core,edgar,geckoview-reviewers,m_kato
Consume transient user activation when showing file/color picker
at any time. Do not open if there is no transent user activation.

Fixed various internal tests broken by this change.

Spec PR: https://github.com/whatwg/html/pull/10344

Differential Revision: https://phabricator.services.mozilla.com/D201096
2024-06-24 10:53:24 +00:00

18 lines
350 B
HTML

<!DOCTYPE html>
<html>
<body>
<input id="target" type="file" />
<script type="text/javascript">
window.onload = function() {
// Activate the page to allow opening the file picker.
SpecialPowers.wrap(document).notifyUserGestureActivation();
var fileInput = document.getElementById("target");
fileInput.click();
};
</script>
</body>
</html>