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

Hiding top-bar application on clicking outside of application #89

Closed
utkarsh-var opened this issue Dec 23, 2016 · 3 comments
Closed

Hiding top-bar application on clicking outside of application #89

utkarsh-var opened this issue Dec 23, 2016 · 3 comments

Comments

@utkarsh-var
Copy link

I have created zendesk app using app framework v1. The major issue I'm facing is that I want to close the app when the user clicks outside it. Zendesk Talk does it nicely but I'm unable to figure out a solution since I can't make app listen to the events outside its scope.

I did read this thread - https://support.zendesk.com/hc/en-us/community/posts/202664363-Conditionally-hiding-an-app?input_string=Hiding%20Topbar%20A

But this.popover('hide') would require an event to close.
Any Ideas on how to achieve it?

@sandlerr
Copy link
Contributor

sandlerr commented Jan 2, 2017

Hi @utkarsh-verma you might like to try focussing your app's element when it is shown and listening for blur events.

@utkarsh-var
Copy link
Author

@sandlerr I have already tried this solution, but problem is that on app.activated event, this.$('.some_element') doesn't return element, so i am not able to add focus to element.

@sandlerr
Copy link
Contributor

sandlerr commented Jan 3, 2017

Perhaps your template is not yet rendered when the selector runs?

Since this issue doesn't relate to the demo apps in this repo I'm going to close it, but you are more than welcome to contact us for support on this specific problem.

@sandlerr sandlerr closed this as completed Jan 3, 2017
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

2 participants