Hide div after keyboard opens. HTML

Asked

Viewed 123 times

0

Good night! I’m developing an app using Ionic / Angular, but I’m having a problem. When clicking on the keyboard, the form elements overwrite the menu and the logo.

I want to hide the Divs responsible for displaying the menu and logo, I am using in html:

<div class="container top" [hidden]="keyboard.isVisible" > 

But you’re only hiding the Ivs by typing something using the keyboard and not by clicking the input as expected.

Thank you for your attention.

  • When you open the keyboard is div not hidden? Only when you start typing something?

  • Exactly sam! What was expected was to click, already hide.

  • tries to set a Boolean to true in input Focus

1 answer

1

arrow one ngmodel in your field Forms #formfield

<div class="container top" *ngif="!formfield.focused" > 

Something along those lines formfield are focused, their div does not appear.

  • YOUR CONTAINER <div class="container top" *ngif="! formfield.focused" >

  • @Renanmartins actually answers yes, I as user of Angular and Ionic say that this is a likely way, of course he could have written what he put in the comment, but it is likely lack of experience in answering questions.

  • @Guilhermenascimento Ok

Browser other questions tagged

You are not signed in. Login or sign up in order to post.