Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Button added to toolbar in Gmail label page shows for few seconds & gets hidden (by Gmail) #774

Open
shashikiran-im opened this issue Jan 11, 2024 · 0 comments

Comments

@shashikiran-im
Copy link
Contributor

Hi GmailJS Team,

Scenario & expected behavior:
We are adding button to toolbar (Refer code below) to show in Gmail custom label page and it was working without any issue until recently. Refer below API method,

Code to add button to toolbar:
gmail.tools.add_toolbar_button("Click Me (GmailJS)", (data) => {
console.log("Toolbar button clicked.");
});

Issue:
Button added to toolbar in Gmail custom label will show up for few seconds and gets hidden and I observed that “disply:none” attribute is set (to hide button).
But earlier buttons added to toolbar was not getting hidden & was visible always.

Steps to reproduce the issue:

  1. Create chrome extension using latest GmailJS library / Clone GmailJS boilerplate code.
  2. Add code below to add new button to toolbar as stated below,
    gmail.tools.add_toolbar_button("Click Me!", (data) => {
    console.log("Click Me button is clicked.");
    });
  3. Install extension.
  4. Reload Gmail page & navigate to existing Gmail custom label.
  5. Observe that button named “Click Me!” is shows up in the toolbar.
  6. After few seconds (or sometimes a minute) button “Click Me!” will gets hidden.
  7. Behind scene Gmail application makes the button hide by adding the property style=”display:none” to button element as below.

    Click Me (GmailJS)

Need Clarification:

  1. Does anyone observed / facing this issue.
  2. Could you please let me know if anyone had tried any solution for the same.

Please share your comments.

Thanks in Advance,
Shashikiran

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

No branches or pull requests

1 participant