navigator.notification.prompt in core plugin "Dialogs" has white-on-white text in version 0.2.10 .

  • 3
  • Problem
  • Updated 4 years ago
I can't test if this is build.phonegap.com or the base PhoneGap framework, because I can only build with build.phonegap.com .

But, with version 0.2.10 of the core dialogs plugin, the routine navigator.notification.prompt seems to draw the insertion point and entered text in white, on the newly white background, so text is invisible. I pasted the sample code from the docs into a test project, and changing from:

gap:plugin name="org.apache.cordova.dialogs" version="0.2.6"

to:

gap:plugin name="org.apache.cordova.dialogs" version="0.2.10"

breaks the prompt routine. (PhoneGap has versions 0.2.7, 0.2.8, and 0.2.9, but these are not available for build.phonegap.com . Thus, not clear which version the breakage happens at, but it is somewhere between 0.2.6 and 0.2.10.

I'll attach screen shots of my test code. The "dark" prompt dialog version with the visible text "Testing" is version 0.2.6. (Note that it uses white text!)

The white version is 0.2.10. It also has "Testing" entered, and returns it properly, but you can't see it -- perhaps the text is still white?

My test code is here: https://github.com/skbohrer/promptTest



Photo of Developer SteadmanHill

Developer SteadmanHill

  • 13 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 3
Photo of Developer SteadmanHill

Developer SteadmanHill

  • 13 Posts
  • 0 Reply Likes
I just looked at my test code on a different model of Android, and on this one I can make out the white blinking cursor, moving across as I type. So this confirms that it is just the wrong font color, e.g. the dialog background color changed in 0.2.10, but the font color is still the same as it was in 0.2.6, giving white text on a white background

I think it likely that this is just on the build.phonegap version, which has only versions 0.2.6 and 0.2.10 of the dialogs core plugin, and skipped all the ones in between. But perhaps someone who can do standalone builds can confirm that it is not a bug in the real phonegap as well.

My application ID for the simple test app that shows the bug is: 1147609
Photo of Marcel Schulze

Marcel Schulze

  • 18 Posts
  • 1 Reply Like
i have the same problem and i opend before, but now we are two, thats great
Photo of Developer SteadmanHill

Developer SteadmanHill

  • 13 Posts
  • 0 Reply Likes
Thanks for chiming in. I couldn't find your post about this when I first posted, though I can see it by clicking your name. No official responses to yours, either, though it seems so simple to reproduce the bug. Does using the older plugin version work for you as a workaround?
Photo of Aidan Jalali

Aidan Jalali

  • 11 Posts
  • 0 Reply Likes
I have this problem with my app too - white dialog and white text = can't see the text. I just updated to lollipop and am having the same issue...
Photo of Dan

Dan

  • 27 Posts
  • 0 Reply Likes
I have the same problem, but only on PhoneGap Build. I tried to build locally and there are no problems with local Android build.

Using PhoneGap Build with:

phonegap-version 3.7.0 (latest)
<gap:plugin name="org.apache.cordova.dialogs" version="0.3.0" source="plugins.cordova.io" /> (latest)



Using local Android build with:

Apache Cordova 4.3.0
Apache Cordova Android 3.7.1



As you can see, there is no problem with local build, but there is ugly orange border around the text..

I am using HTC One with Android 4.4.3

So, the problem is in PhoneGap Build, any ideas hot to fix this?
Photo of Developer SteadmanHill

Developer SteadmanHill

  • 13 Posts
  • 0 Reply Likes
Thanks for testing on local Phonegap to confirm that this is a build.phonegap problem!
Photo of Marcel Schulze

Marcel Schulze

  • 18 Posts
  • 1 Reply Like
This reply was created from a merged topic originally titled Notification / Dialog Plugin 0.2.10 - White prompt window with white font color.

After i upgraded this Plugin my prompts & confirms changed there color to white. I thought it is a design upgrade on android but the input font color is also white and you cant see anything while typing (but you can select the text and see it).

whats going on here?
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
Hi all,

While we look into this issue, you can change the Android theme via config.xml to alleviate this.

<gap:config-file platform="android" parent="/manifest">
<application android:theme="@android:style/Theme.NoTitleBar"></application>
</gap:config-file>

-yiming
Photo of Developer SteadmanHill

Developer SteadmanHill

  • 13 Posts
  • 0 Reply Likes
Thank you for this fix. I believe this fix actually addresses the source of the problem, which seems to be that without this addition, projects to not have the default theme properly set, and thus the old text colors don't match the new default theme.

In addition to problems with the prompt dialog, on Android OS 5, the text for select - option lists was also white on white.

Setting the default theme fixes this issue as well.

Can you set this default theme automatically?

If not, can you add it to the documentation as part of the necessary setup?

Thanks again,
Steve
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
This issue is more related to the Notification plugin per se, rather than PhoneGap Build (as the plugin should display correctly on Light and Dark Material/Holo themes rather than appear white-on-white).

There's already an issue filed here: https://issues.apache.org/jira/browse/CB-8292

-yiming
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
As mentioned by Yi Ming Kuan, this is a Cordova bug, and until it is fixed in the project you'll need to use the workaround he posted above (thanks Yiming).
Photo of Sarah

Sarah

  • 2 Posts
  • 0 Reply Likes
I'm struggling to get this workaround to work.

When using:


<gap:config-file platform="android" parent="/manifest">
<application android:theme="@android:style/Theme.NoTitleBar"></application></gap:config-file>


It produces an invalid congig.xml file. The error upon validation is "Namespace prefix android for theme on application is not defined". I'm struggling to fix this issue, can anyone advise me how to fix that?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
You should include the android: namespace in your widget element.
See the Config-File section of the PGB Docs
Photo of Sarah

Sarah

  • 2 Posts
  • 0 Reply Likes
Fantastic, thank you very much. That's sorted it.