mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Merge pull request #17185 from Snuffleupagus/annotationLayer-modifier
Fix `WidgetAnnotationElement._getKeyModifier` to account for Linux
This commit is contained in:
commit
238f3e728f
2 changed files with 2 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue