Merge pull request #17185 from Snuffleupagus/annotationLayer-modifier
Fix `WidgetAnnotationElement._getKeyModifier` to account for Linux
This commit is contained in:
commit
238f3e728f
@ -1018,8 +1018,7 @@ class WidgetAnnotationElement extends AnnotationElement {
|
||||
}
|
||||
|
||||
_getKeyModifier(event) {
|
||||
const { isWin, isMac } = FeatureTest.platform;
|
||||
return (isWin && event.ctrlKey) || (isMac && event.metaKey);
|
||||
return FeatureTest.platform.isMac ? event.metaKey : event.ctrlKey;
|
||||
}
|
||||
|
||||
_setEventListener(element, elementData, baseName, eventName, valueGetter) {
|
||||
|
@ -619,10 +619,9 @@ class FeatureTest {
|
||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
|
||||
typeof navigator === "undefined"
|
||||
) {
|
||||
return shadow(this, "platform", { isWin: false, isMac: false });
|
||||
return shadow(this, "platform", { isMac: false });
|
||||
}
|
||||
return shadow(this, "platform", {
|
||||
isWin: navigator.platform.includes("Win"),
|
||||
isMac: navigator.platform.includes("Mac"),
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user