WebGLInput icon indicating copy to clipboard operation
WebGLInput copied to clipboard

multiline-newline inputfield

Open Racines opened this issue 4 years ago • 7 comments

Hello, In your demo If you press enter in the inputfield with content type: MultiLine New Line It seems to jump multiple times. Also is your demo using TMP?

Racines avatar Jul 06 '20 11:07 Racines

the sample just setted "Line Space" to 5. i will test for TMP use MultiLine New Line and update the sample for Line Space setting.

kou-yeung avatar Jul 07 '20 01:07 kou-yeung

demo updated. fix Line Space add TMP Input field sample

kou-yeung avatar Jul 07 '20 02:07 kou-yeung

Ok thank you for your reactivity.

It's seem I have bugs using your plugin in my project but it's not happen in your demo. I think these bugs come from specific stuff I use for my project. But maybe do you have an idea on this:

  1. It seems that normal character inputs are not catched by the html inputfield but is catched by inputfield in Unity. The IME seems to work properly if not in ASCII mode.
  2. Also UnityEngine.WebGLInput.captureAllKeyboardInput = true; seems to cause side effect like described here: https://answers.unity.com/questions/1541833/bug-with-webglinputcaptureallkeyboardinput.html?childToView=1748956

Racines avatar Jul 07 '20 09:07 Racines

can you send me a reproduction project for this issue?

kou-yeung avatar Jul 08 '20 00:07 kou-yeung

So after some research I finally found what cause this behavior. Since the use of IME cause to loose some feature of Text Mesh Pro like mouse selection. In my project I want to be able to copy/paste without the need of IME (for latin language). So I use both your plugin and WebGLCopyAndPaste

I made a simple project based on your source code where I added the other plugin. The problem seems to be caused by WebGLCopyAndPaste.jslib at line 56. Probably in conflict with your code when you call UnityEngine.WebGLInput.captureAllKeyboardInput = true;

Maybe are you able to advice me on this?

Racines avatar Jul 08 '20 13:07 Racines

for mouse selection. WebGLInput have a option to support it. you can check on the "Show Html Element" flag to show a HTML element overlap on the input field. (this can use all feature of HTML element, but it will use system font at editing)

i will test the sample and try to fix it. thank you~

kou-yeung avatar Jul 09 '20 00:07 kou-yeung

Yes I see for the "Show Html Element" it work well but it break the immersion of the UI.

Thanks for your help.

Racines avatar Jul 09 '20 07:07 Racines