Skip to content
New issue

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

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

Already on GitHub? # to your account

[Modal] Scrolling should work after closing a modal with the focused input #6675

Open
sa16ot opened this issue Nov 16, 2018 · 2 comments
Open

Comments

@sa16ot
Copy link

sa16ot commented Nov 16, 2018

Steps

  1. Use a mobile browser (tested in Firefox, Chrome, Opera, Opera mini) on Android
  2. Open a modal, which are small enough to fit the page (without scrolling) and has an input
  3. An input got focused (or you should focus it manually, if your modal has autofocus: false), so an android keyboard appears
  4. Close the modal
  5. Now you can't scroll the page

If you close a keyboard (or e.g. blur an input) before closing the modal, the page would scroll normally

Expected Result

User should be able to scroll a page after closing a modal with inputs

Actual Result

User is unable to scroll a page after closing a modal with inputs

Version

2.4.2

Testcase

For a phone with 720x1280 screen resolution there is a testcase:

  1. Go to https://semantic-ui.com/modules/modal.html#full-screen
  2. In section "Full Screen" press "Run Code" (We don't really care about a fullscreen modal, our case is a modal with inputs)
  3. Feedback textarea got focused and an android keyboard appeared
  4. Press close button

P.S.

My workaround is to edit file src/definitions/modules/modal.js (line 428)
( hideModal - $module.transition - onComplete )
add the code
module.unbind.scrollLock();

@lubber-de

This comment was marked as spam.

@andrewheadricke
Copy link

Setting {duration: 0} is another workaround.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants