Open Bug 1895725 Opened 2 years ago Updated 1 month ago

docs.google.com - Keyboard combination for zoom out does not work on german keyboard

Categories

(Web Compatibility :: Site Reports, defect, P2)

Tracking

(Webcompat Priority:P2, Webcompat Score:5)

Webcompat Priority P2
Webcompat Score 5

People

(Reporter: azlata, Unassigned)

References

()

Details

(Keywords: webcompat:contact-ready, webcompat:site-report, Whiteboard: [webcompat:sightline][webcompat:japan][webcompat:core][autowebcompat:processed][autowebcompat:repro-failed])

User Story

platform:windows,mac,linux
impact:feature-broken
configuration:general
affects:some
branch:release
diagnosis-team:DOM
user-impact-score:135
autowebcompat-repro-status:failed
autowebcompat-repro-reason:login
autowebcompat-repro-report-os:all

Attachments

(1 file)

Google documents: browser zoom factor increased for zoom in, not decreased for zoom out; document zoom works

Steps to reproduce:

  1. Navigate to: https://docs.google.com/document

If a German keyboard is used, the following can be observed with Google documents:

  • Ctrl key and "-" pressed: document zoomed out, browser (Firefox) zoom factor not descreased as shown in address bar (expected: descreased)

Environment:
• Browser / Version: Firefox Nightly 127.0a1 (2024-05-07) / Firefox Release 125.0.3 / Chrome 124.0.6367.156
• Operating System: Windows 10

  • Expected Behavior:*
    The page is zoomed out when pressing Ctrl + "-"

Actual Behavior:
The page is not zoomed out when pressing Ctrl + "-"

Notes:

  • Reproducible on both Firefox Release and Nightly
  • Not reproducible on Chrome.
  • Reproducible regardless of settings of Enhanced Tracking Protection

Created from https://github.com/webcompat/web-bugs/issues/136479

Severity: -- → S4
User Story: (updated)
Priority: P3 → P2
User Story: (updated)

This relates to the zoom factor on the url bar, should it be triaged by the front end team first? I think we should start with how the url bar gets the zoom factor?

Dennis, what do you think? Do you think we can update diagnosis-team to the front end team?

Flags: needinfo?(dschubert)

Is this still a thing? I can't repro this on 132 Nightly nor on 130 stable.

(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #2)

Is this still a thing? I can't repro this on 132 Nightly nor on 130 stable.

I couldn't reproduce this, either.

Also agreed with Sean's comment 1, Tabbed Browser folks/front-end team are also my best educated guess to triage and investigate this.

User Story: (updated)

Sebastian, are you still able to reproduce this?

Flags: needinfo?(aryx.bugmail)

Yes, issue still producible with Firefox 133.0a1 20241027210505 here.

Flags: needinfo?(aryx.bugmail)

In both Chrome and Firefox I get document zoom when pushing Ctrl + "-" in Google docs. Do you still see Chrome zooming the page?

Flags: needinfo?(aryx.bugmail)

In Chrome, both Ctrl +/- zooms the page without showing a browser zoom indicator.

Flags: needinfo?(aryx.bugmail)

Isn't that the same as Firefox?

Flags: needinfo?(aryx.bugmail)

Please see the attached image for comparison of behavior regarding zoom factor display in both browsers.

Flags: needinfo?(aryx.bugmail)

I can reproduce this on Windows with an onscreen keyboard

Summary: docs.google.com - Keyboard combination for zoom out does not work → docs.google.com - Keyboard combination for zoom out does not work on german keyboard

Firefox sends a different keycode on the event for '+' than Chrome does. That could be the reason for the difference.

See Also: → 1874727
User Story: (updated)
Whiteboard: [webcompat:sightline]

I think Jeff is right about the reasoning.

I can reproduce this with pressing control + '='

In Google Doc, we don't show the zoom factor UI because the client JS code calls preventDefault() for ctrl + '=', and we respect this call in the parent process. and Google Doc's client code for this is like

function jCe(a) {
    var c = a.Yf();
    c = (c = c && "composed"in c && c && "composedPath"in c && c.composed && c.composedPath()) && c.length > 0 ? c[0] : a.target;
    return kCe(lCe(mCe((new nCe).keyCode(a.keyCode || 0).key(a.key || "").shiftKey(!!a.shiftKey).altKey(!!a.altKey).ctrlKey(!!a.ctrlKey).metaKey(!!a.metaKey).target(a.target), c), function() {
        return a.preventDefault()
    }), function() {
        return a.stopPropagation()
    }).timeStamp(a.timeStamp || 0).ma()
}

I see Google Doc has a few places that maintain a map between keycode and the actual key. One place that looks suspicious

function gCe(a) {
    switch (a) {
    case 61:
        return 187;
    case 59:
        return 186;
    case 173:
        return 189;
    case 224:
        return 91;
    case 0:
        return 224;
    default:
        return a
    }
}

187 is what Chrome dispatches for pressing '=' in both English and German keyboard.

In Firefox, we dispatch 61 for pressing '=' in English keyboard, and with 171 in German keyboard, and there's no mapping for this 171 keycode. So no preventDefault() was called, thus we showed the zoom factor UI.

For me, I can only reproduce this with control + '=', but not control + '-', so I checked the keycode for '-', and noticed we dispatch the same keycode 173 in both English and German keyboard. So I think maybe we can consider to update the keycode for '=' given it's consistent with '-'.

Anyway, it should be a site bug of Google Doc, but I'll also file a bug to align the keycode for '='.

Flags: needinfo?(dschubert)
See Also: → 1934679

Given the counterargument in bug 1934679, should we reach out to Google first to remove keyCode usage?

Yeah, I think that'd be ideal, or they could add another special case for Firefox...

Webcompat Priority: --- → P2
Webcompat Score: --- → 5
Whiteboard: [webcompat:sightline] → [webcompat:sightline][webcompat:japan]
User Story: (updated)
Whiteboard: [webcompat:sightline][webcompat:japan] → [webcompat:sightline][webcompat:japan][webcompat:core]
Whiteboard: [webcompat:sightline][webcompat:japan][webcompat:core] → [webcompat:sightline][webcompat:japan][webcompat:core][autowebcompat:processed]
User Story: (updated)
Whiteboard: [webcompat:sightline][webcompat:japan][webcompat:core][autowebcompat:processed] → [webcompat:sightline][webcompat:japan][webcompat:core][autowebcompat:processed][autowebcompat:repro-failed]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: