Skip to content

How to open keyboard and allow input click while popover form tour is visible (Ionic) #141

Answered by hvma411
hvma411 asked this question in Q&A
Discussion options

You must be logged in to vote

This is really strange behaviour for me but I found simple workaround for this problem so I'll add it here. Maybe someone will need it in future.

Workaround:

Create function to handle event target and to find ion-popover which is used for ngx-ui-tour and simple change its display property to none, then use focus() at event target to focus on input and after that just change ion-popover display property again to block. Use this function in click event on input.

handleInputClick(e: MouseEvent) {
	const popover = document.querySelector('ion-popover');
	const target = e.target as HTMLInputElement;
	popover.style.display = 'none';
	target.focus();
	popover.style.display = 'block';
}

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hakimio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants