Topic: Modal - unable to scroll content by keyboard

meesha81 priority asked 1 year ago


Open your demo at: https://mdbootstrap.com/docs/standard/components/modal/#section-scrolling-long-content

The second one - with .modal-dialog-scrollable.

First issue: You are not able to scroll via keyboard. Option keyboard:true|false has no effect. I think that use should be able to use keyboard to scroll content with PGUP/PGDOWN, HOME, END and ARROWS.

Second issue: Is it correct that hide events are not fired when keyboard: true ? I would like to destroy content in modal container after hide, but I now, I have to use keyboard:false and check Escape pressed manually. hide events are fired correctly. Is it possible to fire events about show and fire always (= not be affected by keyboard: true|false) ?


meesha81 priority answered 1 year ago


Solved by my custom PGUP/PGDOWN, HOME/END in modal. I understand that keyboard:false need to solve these myself.


meesha81 priority answered 1 year ago


Hi, when do you plan to release new version with some important fixes as I reported ago? I have reported some critical bugs for our project, but no fix yet:(

Eg. this one... unable to use arrows/pgup/pgdown/home/end in the modal for scrolling?


Grzegorz Bujański staff commented 1 year ago

Unfortunately, we can't always release fixes as quickly as we'd like. Please note that we are developing many components and plugins at the same time. In addition, we must ensure that our package is up to date with the latest version of Bootstrap. We will try to release a new version soon. I cannot guarantee that we will be able to fix the bugs you reported in the next release. Especially the issue with arrows/pgup/pgdown scrolling. It turns out that this is not a bug in our package. Bootstrap did not provide such an option. We need to discuss in the team if we want to add such a feature to our package. We will try to do it soon, but as I mentioned before - I cannot guarantee that this will be implemented in the next release


meesha81 priority commented 1 year ago

As I understand it is because of keyboard: false. This blocks escape and also arrows. So I would catch keys and do scrolling myself. It would be nice to split escape and other special keys. Current state have no sense, but I understand it is propably because of Bootstrap 5.


meesha81 priority answered 1 year ago


Thank you for information. I am looking forwad to fixed version.

Yes, you are correct - htank you, hidden event is really fired even keyboard: true, I had to make some other mistake during test.


Kamila Pieńkowska staff answered 1 year ago


The first issue is a bug, and we will fix it.

About the second issue, if you want to destroy the modal after it's hidden use event hidden. It fires after the modal is hidden even if keyboard: true.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.1.0
  • Device: PC
  • Browser: Chrome
  • OS: WIN11
  • Provided sample code: No
  • Provided link: Yes