The search input of a select module cannot be focused when t


Topic: The search input of a select module cannot be focused when this select exists in a modal

用户9506 pro premium priority asked 2 years ago

as title said, when I use a modal, and put a filtered select with a search input , the search input can not be focused any more, this situation only happend when this select existed in a modal, how can I resolve this issue ? thanks.


用户9506 pro premium priority answered 2 years ago

I find the reason at last, you have to initial your modal with focus property as false, such as

const modal_detail = new mdb.Modal(dom\_modal, { backdrop: true, keyboard: true, focus: false }); or via data attributes data-mdb-focus="false".


用户9506 pro premium priority commented 2 years ago

focus="true" makes this issue.


用户9506 pro premium priority answered 2 years ago

and I cannot type into any characters to the search input.


mlazaru staff answered 2 years ago

Hi,

I've tried to recreate this problem but for some reason i couldn't

I created modal with data-mdb-focus='true', input with filter and it does work normally. Are you able to recreate the problem in snippet? https://mdbootstrap.com/snippets/standard/mlazaru/4343563


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: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 4.1.0
  • Device: PC
  • Browser: Chrome
  • OS: WINDOWS11
  • Provided sample code: No
  • Provided link: No