Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(web): some keys are not fully visible when testing OSK in Chrome emulator #5779

Closed
MakaraSok opened this issue Sep 30, 2021 · 1 comment · Fixed by #5906
Closed

bug(web): some keys are not fully visible when testing OSK in Chrome emulator #5779

MakaraSok opened this issue Sep 30, 2021 · 1 comment · Fixed by #5906

Comments

@MakaraSok
Copy link
Collaborator

Describe the bug

When tested khmer_angkor keyboard on Chrome emulator, some keys on the Shift layer are cropped off.

Windows/macOS/Linux desktop

No touch device has this issue.

Expected behavior

The character on each cap should be readability, nothing is cropped off.


Keyman Developer:


Keyboard

  • Keyboard name: khmer_angkor
  • Keyboard version: 1.0.9
  • Language name: Khmer
@mcdurdin
Copy link
Member

mcdurdin commented Oct 2, 2021

I wonder if this is a font issue? In any case, it's not specific to Keyman Developer -- it's to do with rendering in KeymanWeb.

@mcdurdin mcdurdin changed the title bug(developer): some keys are not fully visible when testing OSK in Chrome emulator bug(web): some keys are not fully visible when testing OSK in Chrome emulator Oct 2, 2021
@mcdurdin mcdurdin added this to the 15.0 milestone Oct 2, 2021
@mcdurdin mcdurdin modified the milestones: 15.0, A15S18 Nov 14, 2021
mcdurdin added a commit that referenced this issue Nov 14, 2021
Fixes #5779.
Fixes #5731 (I believe mitigation is sufficient to close this issue).

A variety of interrelated font and font size display issues resolved:
1. KVK font was not applied early enough for size calculations, which
   meant that we were calculating font scaling per key based on a
   default font when transforming from the KVK data for desktop devices
   (defaultLayout.ts)
2. Font scaling for non-default layers was calculated when elements were
   not visible and had no size information, giving incorrect values. To
   resolve this, font scaling is now calculated when a layer is made
   visible, which had performance impacts; resolved by reducing
   unnecessary `layer.refreshLayout()` calls; see performance point 1
   below (oskView.ts:layerChangeHandler())
3. `getViewportScale()` would return an incorrect scaled value when
   emulating touch devices on a desktop browser (kmwutils.ts)
4. After switching keyboards, the device-specific scaling factor was not
   maintained (oskView.ts:refreshLayout())

Related performance improvements:
1. Multiple calls to `layer.refreshLayout()` in `refreshLayout()` have
   been eliminated, and only the currently visible layer is now
   refreshed. This dramatically reduces the number of calls to
   `getIdealFontSize()` which was the primary concern of #5731.
   (visualKeyboards.ts)
2. Unnecessary use of `innerHTML` replaced with `innerText`
   (oskBaseKey.ts)

Minor Keyman Developer performance improvement:
1. The web debugger no longer recalculates the OSK twice (test.js)
@mcdurdin mcdurdin modified the milestones: A15S18, A15S19 Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants