Topic: Popover with trigger="focus" is not working in Safari when content loaded dynamically

meesha81 priority asked 1 week ago


*Expected behavior*Touch/click on popover link displays popover in all platforms (PC/iOS Safari).

*Actual behavior*Is not opened dynamically loaded popover with trigger=focus

Resources (screenshots, code snippets etc.)https://mdbootstrap.com/snippets/standard/meesha81/6389250

Is there something wrong with my usage? Your example which is not dynamically loaded it is working fine with Safari. So it looks like bug when popover is initialized manually via javascript.


meesha81 priority answered 3 days ago


  1. Please forgot everything about click. This issue is not about click.
  2. I just wrote exactly what is wrong (unable to open popover when dynamically loaded)Popover with trigger="focus" is not working in Safari when content loaded dynamically

I did snippet. You can open it in IOS safari, click button and click open popover. You will see in 5 seconds that it is not working. If not dynamically loaded, it is working, like you example.

So the bug is exactly as I wrote in subject:

Popover with trigger="focus" is not working in Safari when content loaded dynamically.


Kamila Pieńkowska staff commented 2 days ago

Than it is a bug and we will fix it. Until then you may consider setting multiple triggers: data-mdb-trigger="focus click"


Kamila Pieńkowska staff answered 3 days ago


As far as we tested it works. Please describe a use case that you have problem with.


meesha81 priority commented 3 days ago

No, it isn't. Have you ever tried my snippet? It is NOT working in Safari IOS. If I spend time with creating snippet, it would be so nice if you can open it and try it...


Kamila Pieńkowska staff answered 3 days ago


Yes. You wrote:

Actual behavior Is not working on touch device iPad. trigger="click" is working on touch device, but do not hide when clicked outside. I want hide popover when clicked out of popover.


meesha81 priority answered 4 days ago


Sorry, but what you can't understand? Popover with trigger="focus" is not working in Safari when content loaded dynamically

I wrote that it is not working with focus. Do you see something different?


meesha81 priority answered 5 days ago


Okey, but what about my reported bug? It is about popover opening, not about closing. Information about closing was only "behavior" information.


Kamila Pieńkowska staff commented 4 days ago

It does work if you set trigger to click. But it is not what you provide in your snippet. You set trigger to "focus" via data attribute.


Kamila Pieńkowska staff answered 5 days ago


Popover is not suppose to close on outside click. It closes on second click on a trigger. You've set to open on focus so it stopped working with click.



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

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 8.2.0
  • Device: iPhone
  • Browser: Safari
  • OS: iOS
  • Provided sample code: No
  • Provided link: Yes