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] - Specialcharacters keyboard close button is not visible when kioskboard-overflow class present #60

Closed
revaij83 opened this issue Jun 16, 2022 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@revaij83
Copy link
Contributor

Describe the bug

When special characters are enabled and the keyboard's height takes up more then 2/3 of the window's height the close button of the specialcharacters window is not visible.

Steps to reproduce

  1. Setup a keyboard with special characters enabled.
  2. Open the keyboard in a window resized so that the keyboard takes up more than 2/3 of the window height. If you initially opened a higher window and then resized it, refresh the browser.
  3. Activate the special characters on the keyboard.

Result: Special characters Close button not visible.

Expected behavior

Special characters close button should be always visible when special characters are activated.

Screenshots

image

Additional context

This was an issue for us on ipad mini 1024x768 for us, see screenshot. The issue came from these lines in kioskboard.js:

    // check window and keyboard height: begin
    var windowHeight = Math.round(window.innerHeight);
    var documentHeight = Math.round(window.document.body.clientHeight);
    var keyboardHeight = Math.round(window.document.getElementById(kioskBoardVirtualKeyboard.id).offsetHeight);
    if (keyboardHeight > Math.round((windowHeight / 3) * 2)) {
      var keyboardWrapper = window.document.getElementById(kioskBoardVirtualKeyboard.id).getElementsByClassName('kioskboard-wrapper')[0];
      keyboardWrapper.style.maxHeight = Math.round((windowHeight / 5) * 4) + 'px';
      keyboardWrapper.style.overflowX = 'hidden';
      keyboardWrapper.style.overflowY = 'auto';
      keyboardWrapper.classList.add('kioskboard-overflow');
    }

On the above screenshot the keyboard took up more than 2/3 of the screen but less than 4/5. So even though the kioskboard-overflow class and the additional styles were added by the above lines, there is no scrollbar visible on the screenshot. But since overflow-y is not set to "visible" anymore and the absolutely positioned special characters close button's top is set to -42.5px, the button is not visible anymore as it's outside of the boundaries of the relatively positioned kioskboard-wrapper div.

As a workaround (not a fix) I've added this css rule:
#KioskBoard-VirtualKeyboard .kioskboard-wrapper.kioskboard-overflow .kioskboard-row-specialcharacters span.kioskboard-specialcharacter-close {
top:0 !important;
}

This forced the closebutton back into the kioskboard-wrapper's visible area:
image

@revaij83 revaij83 added the bug Something isn't working label Jun 16, 2022
@furcan furcan added this to the v2.3.0 milestone Oct 16, 2022
furcan added a commit that referenced this issue Oct 16, 2022
@furcan furcan mentioned this issue Oct 16, 2022
@furcan
Copy link
Owner

furcan commented Oct 16, 2022

@furcan furcan closed this as completed Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants