Explicitly disable native drop down menu on UWP.
This commit is contained in:
@@ -7,8 +7,9 @@ import 'webcomponents.js/webcomponents-lite';
|
||||
const EmbySelectPrototype = Object.create(HTMLSelectElement.prototype);
|
||||
|
||||
function enableNativeMenu() {
|
||||
// WebView 2 creates dropdown that doesn't work with controller.
|
||||
if (browser.edgeUwp || browser.xboxOne) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Doesn't seem to work at all
|
||||
@@ -80,7 +81,7 @@ function onMouseDown(e) {
|
||||
|
||||
function onKeyDown(e) {
|
||||
// Xbox controller for UWP WebView2 uses keycode 195 to select.
|
||||
if (e.keyCode === 13 && !enableNativeMenu() || (e.keyCode === 195 && browser.edgeChromium)) {
|
||||
if ((e.keyCode === 13 || e.keyCode === 195) && !enableNativeMenu()) {
|
||||
e.preventDefault();
|
||||
showActionSheet(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user