question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] body bottom padding doesn't get removed when using shared virtual keyboard

See original GitHub issue

Description

Bottom padding CSS gets added to the HTML body element, when opening a virtual keyboard and is removed when closing the keyboard. However, when using a shared keyboard across multiple fields, it doesn’t seem to detect the keyboard being closed and keeps adding to the padding each time a keyboard is opened.

Steps to Reproduce

Can be reproduced with basic implementation of shared keyboard:

import * as Mathlive from 'mathlive'

const app = document.querySelector('#app')

const mathfields = [
  new Mathlive.MathfieldElement({ keyboardMode: 'onfocus' }),
  new Mathlive.MathfieldElement({ keyboardMode: 'onfocus' }),
  new Mathlive.MathfieldElement({ keyboardMode: 'onfocus' })
]

mathfields.forEach(f => app.appendChild(f))

Mathlive.makeSharedVirtualKeyboard({})

OR

  1. Go to https://mathlive-shared-keyboard.vercel.app/
  2. Focus on fields a couple of times to open keyboard
  3. Inspect the HTML body style attribute

Actual Behavior

The padding style in HTML body piles up.

image

Expected Behavior

It should not pile up, padding should be removed each time a keyboard is closed.

Environment

0.76.1

Browser [Chrome}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
sbondaryevcommented, Jul 1, 2022

@arnog the idea was to add/remove a div placeholder in virtualKeyboardContainer instead of changing the its padding-button but I realized that the content of virtualKeyboardContainer can be also changed - so, not a good idea.

0reactions
sbondaryevcommented, Jul 1, 2022

@arnog Great I will close the PR then. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

When the keyboard appears, the Flutter widgets resize. How ...
Updated Answer. resizeToAvoidBottomPadding is now deprecated. The updated solution is to set resizeToAvoidBottomInset property to false .
Read more >
[v4] BottomSheetScrollView causes extra padding to appear
Using a combination of BottomSheetModal , BottomSheetScrollView and BottomSheetTextInput with keyboardBehavior set to interactive will result in extra padding/ ...
Read more >
HTML, CSS & JavaScript Tutorial (Project Video) - YouTube
In this video we'll be creating a virtual keyboard using pure HTML, CSS & JavaScript (no libraries required). This is done from scratch...
Read more >
10 Most Common Bootstrap Mistakes That Developers Make
Common Bootstrap Mistake #6: File input button component problem. Bootstrap doesn't have a designated component for a file upload button. A simple and...
Read more >
Why does samsung keyboard suck so much? - Reddit
Ive recently tried using it instead of google keyboard because it just integrates better in terms of authentics.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found