phonegap / phonegap-cli

PhoneGap and PhoneGap/Build command-line interface
Apache License 2.0
489 stars 157 forks source link

cli-6.5.0 - Breaks "keyboard accessory bar"? Location of updates? #682

Closed c2-erogers closed 7 years ago

c2-erogers commented 7 years ago

NOTE: This update to PhoneGap cli-6.5.0 was suggested via PhoneGap Build .. but I don't see that version here at all? Where is the location of this version of updates? It is on the list of PhoneGap Versions.

PhoneGap CLI, node & npm versions

PhoneGap cli-6.5.0 NPM 2.15.8 Node 4.4.7

Expected Behaviour

"HideKeyboardFormAccessoryBar(boolean)" defaults to false and works.

Actual Behaviour

"HideKeyboardFormAccessoryBar(boolean)" preferences seems to have no impact within config.xml and cordova keyboard plugin. The Accessory Bar is just always hidden even though it is defaulted to false.

Steps to Reproduce

Sample Code that illustrates the problem

N/A

Error messages

N/A

wildabeast commented 7 years ago

Just to confirm, are you building locally or remotely on PhoneGap Build?

You're right it doesn't make a lot of sense that PGB has released that version when the Phonegap CLI hasn't released it yet. However you can see the specific version breakdown here.

Maybe also share the exact xml you're using in your config.xml to set HideKeyboardFormAccessoryBar.

wildabeast commented 7 years ago

Assuming you're on PGB, might also be worth trying cli-6.4.0 to verify when the issue was introduced.

c2-erogers commented 7 years ago

@wildabeast - This particular comment is based on building remotely on PhoneGap Build. I can build it out locally, Android/iOS, to compare and follow up here once I get a chance.

The notice received is :

This app isn't using the latest version of PhoneGap. We recommend upgrading to cli-6.5.0.

The config.xml file doesn't seem to actually have any affect; with a bare-bones config.xml (without the 'HideKeyboardFormAccessoryBar' preference set), cli-6.3.0 shows the accessory bar and cli-6.5.0 does not. However, using cli-6.5.0 with the 'HideKeyboardFormAccessoryBar' preference set to 'false' does not help.

The following settings (first config.xml, second JS within deviceready):

<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
<preference name="HideKeyboardFormAccessoryBar" value="false" />

and

cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);

do not re-enable this accessory bar in cli-6.5.0. That said, the preferences shouldn't be necessary as it should default to 'false' from the Cordova Documentation like it does in cli-6.3.0

c2-erogers commented 7 years ago

@wildabeast - Following up on your second comment; cli-6.4.0 works as expected (like cli-6.3.0).

cli-6.5.0 seems to be the culprit.

wildabeast commented 7 years ago

Thats interesting ... from the PGB version breakdown the iOS versioning is:

Surprising that a minor patch would introduce that issue (here's the diff between those versions for interest's sake, nothing jumps out that would cause this).

@c2-erogers if you're set up to do so, it would be very helpful if you did local builds of both cordova-ios 4.3.0 and 4.3.1, and see if the issue manifests.

wildabeast commented 7 years ago

Actually looking at the docs again HideKeyboardFormAccessoryBar is a Blackberry-only preference... so that preference having no effect is expected.

Nonetheless the change in keyboard behaviour is still an issue.

Assuming that this also occurs when building locally, can you log an issue with the keyboard-plugin at https://issues.apache.org/jira/browse/CB/?

If it doesn't manifest when building locally, it is likely a PGB issue and we can move from there.

c2-erogers commented 7 years ago

Those cli/cordova-ios versions match up within PGB, too, after a successful build.

I will definitely try building locally with both versions ASAP--likely won't get a chance until the weekend, but it is on my list if we don't discover I'm just an idiot before then.

Good catch on the HideKeyboardFormAccessoryBar only existing for BlackBerry, I had not noticed. =(

shazron commented 7 years ago

HideKeyboardFormAccessoryBar was removed in cordova-ios 3.2.0 Looks like you are using the Ionic Keyboard Plugin, and it does not use the HideKeyboardFormAccessoryBar preference either. I don't think its a platform problem, but a plugin problem (since they would be the ones that have the code to modify the accessory bar).

c2-erogers commented 7 years ago

@shazron - This problem exists without the use of the HideKeyboardFormAccessoryBar preference or keyboard plugins (I used a couple plugins during testing). These preferences/plugins were only implemented in hopes of fixing the initial issue.

shazron commented 7 years ago

I can guarantee that the latest version of cordova-ios does not have any code that touches the accessory bar, nor does it handle HideKeyboardFormAccessoryBar nor does HideKeyboardFormAccessoryBar occur anywhere -- so adding/not adding that pref should not make any difference.

c2-erogers commented 7 years ago

Right. It does not make any difference. My initial dump is misleading because I was trying to use HideKeyboardFormAccessoryBar to fix the issue at hand.

However, the issue still exists. The accessory bar still is hidden my cli-6.5.0 build for some reason.. even without using any preferences/plugins.

shazron commented 7 years ago

Getting back to the question: Does cordova-cli 6.5.0 / cordova-ios 4.3.1 hide the keyboard accessory bar?

The answer for me is No based on my test below. I just created a quick new project:

$ cordova --version
6.5.0
$ cordova create test
Creating a new cordova project.
$ cd test
$ cordova platform add ios
Adding ios project...
Creating Cordova project for the iOS platform:
    Path: platforms/ios
    Package: io.cordova.hellocordova
    Name: HelloCordova
iOS project created with cordova-ios@4.3.1
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for ios

Added a simple: <input type="text" value="sometext" style="width:100px"/> to www/index.html and touched it (iOS 10). The accessory bar is still there.

wildabeast commented 7 years ago

Ok thanks @shazron, might be PGB only, I'll try it out asap

filmaj commented 7 years ago

Unclear to me whether this is a PGB issue or a CLI issue. Any updates on this thread, @wildabeast / @c2-erogers ?

c2-erogers commented 7 years ago

@filmaj - I am unsure; I haven't had time to dig in and help test like I had hoped.

But, as an update, I'm assuming it was either a PGB issue that was fixed or something I was doing incorrectly. I had given up, but I tried the update again in late March and it worked as expected (as far as I recall, I didn't change anything that would have resolved the issue).

filmaj commented 7 years ago

Excellent! In that case I am closing the issue down - feel free to re-open if you see it crop up once more.