mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Fix space keyboard shortcuts conflicting with native zoom shortcuts
This commit is contained in:
parent
ae624658c9
commit
5a561b674f
@ -566,6 +566,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||||||
private navigateForwardBack(back: boolean) {
|
private navigateForwardBack(back: boolean) {
|
||||||
this.ipcCall(back ? "navigateBack" : "navigateForward");
|
this.ipcCall(back ? "navigateBack" : "navigateForward");
|
||||||
}
|
}
|
||||||
|
|
||||||
private navigateToSpace(num: number) {
|
private navigateToSpace(num: number) {
|
||||||
dis.dispatch<SwitchSpacePayload>({
|
dis.dispatch<SwitchSpacePayload>({
|
||||||
action: Action.SwitchSpace,
|
action: Action.SwitchSpace,
|
||||||
@ -599,6 +600,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||||||
// breaks skinning as the platform is instantiated prior to the skin being loaded
|
// breaks skinning as the platform is instantiated prior to the skin being loaded
|
||||||
SettingsStore.getValue("feature_spaces") &&
|
SettingsStore.getValue("feature_spaces") &&
|
||||||
ev.code.startsWith("Digit") &&
|
ev.code.startsWith("Digit") &&
|
||||||
|
ev.code !== "Digit0" && // this is the shortcut for reset zoom, don't override it
|
||||||
isOnlyCtrlOrCmdKeyEvent(ev)
|
isOnlyCtrlOrCmdKeyEvent(ev)
|
||||||
) {
|
) {
|
||||||
const spaceNumber = ev.code.slice(5); // Cut off the first 5 characters - "Digit"
|
const spaceNumber = ev.code.slice(5); // Cut off the first 5 characters - "Digit"
|
||||||
|
Loading…
Reference in New Issue
Block a user