ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
12.14k stars 1.01k forks source link

bug: Keyboard.setAccessoryBarVisible has no effect #2459

Closed datawaslost closed 4 years ago

datawaslost commented 4 years ago

Bug Report

Capacitor Version

npx cap doctor output:

Latest Dependencies:
  @capacitor/cli: 1.5.0
  @capacitor/core: 1.5.0
  @capacitor/android: 1.5.0
  @capacitor/ios: 1.5.0

Installed Dependencies:
  @capacitor/cli 1.5.0
  @capacitor/core 1.5.0
  @capacitor/android 1.5.0
  @capacitor/ios 1.5.0

[success] Android looking great! 👌
  Found 19 Capacitor plugins for ios:
    capacitor-analytics (0.0.4)
    cordova-plugin-advanced-http (2.4.0)
    cordova-plugin-apprate (1.5.0)
    cordova-plugin-dialogs (2.0.2)
    cordova-plugin-facebook4 (6.2.0)
    cordova-plugin-file (6.0.2)
    cordova-plugin-globalization (1.11.0)
    cordova-plugin-inappbrowser (3.2.0)
    cordova-plugin-inapppurchase (1.2.0)
    cordova-plugin-ionic-keyboard (2.2.0)
    cordova-plugin-ionic-webview (3.1.2)
    cordova-plugin-nativestorage (2.3.2)
    cordova-plugin-screen-orientation (3.0.2)
    cordova-plugin-splashscreen (5.0.3)
    cordova-plugin-statusbar (2.4.3)
    cordova-plugin-tts (0.2.3)
    cordova-plugin-whitelist (1.3.4)
    cordova-sqlite-storage (3.4.1)
    es6-promise-plugin (4.2.2)

Affected Platform(s)

Current Behavior

Using the Keyboard plugin to hide the keyboard accessory bar has no effect on iOS 13 or Android.

Expected Behavior

The Keyboard Accessory bar should hide when isVisible is set to false.

Sample Code or Sample Application Repo

Keyboard.setAccessoryBarVisible({isVisible: false});

Does not affect how the keyboard displays. You can hide the accessory bar by setting autocorrect and autocomplete attributes on iPhone, but the bar will still display on iPads.

Reproduction Steps

Other Technical Details

This function returns as unimplemented in Android (Keyboard.java) but there's code that should implement it on iOS in Keyboard.m

npm --version output:

node --version output:

pod --version output (iOS issues only):

Other Information

jcesarmobile commented 4 years ago

AccessoryBar is an iPhone thing, the iPad and Android bars have different names and as far as I know they can't be removed.

kennblvnp commented 4 years ago

This one works for me

import React from 'react'
import { Plugins } from '@capacitor/core'
const { SplashScreen } = Plugins
const { Keyboard } = Plugins
Keyboard.setAccessoryBarVisible({isVisible: true})
dcyou commented 3 years ago

This one works for me

import React from 'react'
import { Plugins } from '@capacitor/core'
const { SplashScreen } = Plugins
const { Keyboard } = Plugins
Keyboard.setAccessoryBarVisible({isVisible: true})

THANKS GOD

ionitron-bot[bot] commented 1 year ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.