airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
200 stars 11 forks source link

[Windows][macOS] InteractiveObject::softKeyboard cannot be set #172

Open itlancer opened 4 years ago

itlancer commented 4 years ago

Problem Description

InteractiveObject::softKeyboard value cannot be set with Windows and macOS. After you set any SoftKeyboardType constant as a value for that property you will get SoftKeyboardType.DEFAULT anyway.

Tested with multiple AIR versions even with latests AIR 32.0.0.89, AIR 32.0.0.144 beta and AIR 33.0.2.330 with multiple Windows and macOS devices with 32-bit and 64-bit AIR applications with captive runtime with any SoftKeyboardType constant. The same problem in all cases. It works fine with Android and iOS.

Steps to Reproduce

Launch code below with Windows or macOS device. Application set SoftKeyboardType.NUMBER for TextField::softKeyboard and then trace it. Application example with sources attached. soft_keyboard_set_bug.zip

var textField:TextField = new TextField();
textField.softKeyboard = SoftKeyboardType.NUMBER;//Set "number" soft keyboard type
trace(textField.softKeyboard);//return "default" but must return "number"

Actual Result: TextField::softKeyboard return "default".

Expected Result: Getting TextField::softKeyboard must return "number" (SoftKeyboardType.NUMBER value).

Known Workarounds

Write your own logic with class override or use other custom property.

ajwfrost commented 4 years ago

Hi

The code for soft keyboard functionality is dependent on whether or not the platform supports virtual keyboards: currently this is only supported on mobile platforms (iOS/Android). So using this on desktop platforms isn't going to work anyway.

To work around this perhaps, we could throw an argument error when trying to set the soft keyboard type on a platform that doesn't support it?

itlancer commented 4 years ago

Hi @ajwfrost Yes, I know that soft keyboard right now supported only for iOS/Android (feature request for Windows: https://github.com/Gamua/Adobe-Runtime-Support/issues/174). We try to use InteractiveObject::softKeyboard property to emulate some logic with soft keyboard for Windows application by overriding etc but found this issue. May be correct way really is to throw an argument error for platforms that not support soft keyboard to prevent confuses.