Wrong toolbar size with physical keyboard


#1

Hi there,

I use the ionic-plugin-keyboard. I need to resize my view so that I can see every time my text area. I also resize my view using this code in the controller. It works fine with the internal virtual keyboard, but not at all with a physical keyboard.

        $window.addEventListener('native.keyboardshow', keyboardShowHandler);
        function keyboardShowHandler(e){
          angular.element("#docView").css('height', 'calc(100vh - ' + e.keyboardHeight + 'px)');
        }

        $window.addEventListener('native.keyboardhide', keyboardHideHandler);
        function keyboardHideHandler(e){
          angular.element("#docView").css('height', 'calc(100vh)');
        }

The e.keyboardHeight returns every time the height of the full keyboard and not only the height of the toolbar. How can I get the height of the toolbar only ?

Thanks.

Pascal