IgnitionSDK TouchscreenMouseListener does not hide password when listening to TouchscreenPasswordField

IgnitionSDK TouchscreenMouseListener does not hide password when listening to TouchscreenPasswordField.

Symptoms:

  • When TouchscreenMouseListener is attached to a TouchscreenPasswordField component, the on-screen keyboard is rendered. However, the password is displayed in clear text on the on-screen keyboard UI.
  • After pressing enter on the on-screen keyboard, the password is properly masked within the TouchscreenPasswordField.
  • See screenshots attached.

Expected result:

  • Password is masked on the on-screen keyboard before pressing enter.

Below is an excerpt from our custom IgnitionSDK module. Please comment if we are missing some lines or using the API incorrectly.

import com.inductiveautomation.vision.api.client.components.touchscreen.TouchscreenMouseListener;
import com.inductiveautomation.vision.api.client.components.touchscreen.TouchscreenPasswordField;

private TouchscreenPasswordField txtPassword = new TouchscreenPasswordField();
txtPasswordTouchListener = new TouchscreenMouseListener(txtPassword);
txtPassword.setTouchscreenMode(TouchscreenMouseListener.MODE_SINGLE_CLICK);
txtPassword.addMouseListener(txtPasswordTouchListener);

TouchscreenPasswordField.getTouchscreenStyle() natively returns com.inductiveautomation.factorypmi.application.components.util.TouchscreenMouseListener.KeyboardStyle.Auto

Note, this is a different KeyboardStyle than com.inductiveautomation.vision.api.client.components.touchscreen.KeyboardRequester.KeyboardStyle.Password

It looks like TouchScreenPasswordField is used specifically for the user management/roster management components. For a more general purpose component (which should use the password mode as expected) try com.inductiveautomation.factorypmi.application.components.PMIPasswordField.

1 Like

I’ve confirmed that PMIPasswordField works as desired.

I am now using PMIPasswordField and PMITextField.
I no longer need to explicitly create TouchscreenMouseListener objects nor explicitly addMouseListener(…) as these are included in the PMIPasswordField and PMITextField objects.