Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Wrong position for first time in createPopup #259

Closed
Mizan-Rifat opened this issue Jan 31, 2023 · 3 comments
Closed

Wrong position for first time in createPopup #259

Mizan-Rifat opened this issue Jan 31, 2023 · 3 comments
Labels
more info needed Waiting for additional information from the submitter

Comments

@Mizan-Rifat
Copy link

When I click on my picker for the first time the popup appears at the left 0 position but after that it works fine. See my attachments...
Screenshot 2023-01-31 at 4 38 26 PM
Screenshot 2023-01-31 at 4 38 36 PM

@joeattardi
Copy link
Owner

Can you share a code sample that shows how you are opening the picker?

@joeattardi joeattardi added the more info needed Waiting for additional information from the submitter label Feb 3, 2023
@Mizan-Rifat
Copy link
Author

Here is my integration:

     const btn = document.querySelector('.emoji-btn');
     const picker = window.picmoPopup.createPopup(
        {},
        {
          referenceElement: btn,
          triggerElement: btn,
          position: 'bottom-start',
          showCloseButton: false
        }
      );
      btn.addEventListener('click', () => {
        picker.toggle();
      });`

@joeattardi
Copy link
Owner

Thank you! I see the issue now, I forgot to update the popup picker to accommodate the prefixed classes!

Once I made that change the positioning should work as expected, can you give the just-released 5.7.4 a try?

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
more info needed Waiting for additional information from the submitter
Projects
None yet
Development

No branches or pull requests

2 participants