dantasulisses / WebMobileInputFix

A Unity WebGL workaround to enable mobile input (virtual keyboard) be triggered by Input Fields
MIT License
55 stars 14 forks source link

Different way to call functions #2

Open theGiallo opened 5 years ago

theGiallo commented 5 years ago

I was having troubles with the two calls. I've found infos here and fixed in this way:

string replace = "\r\n

\r\n\t\t<form onsubmit=\"FixInputOnSubmit()\" autocomplete=\"off\" style=\"width: 0px; height: 0px; position: absolute; top: -9999px;\">\r\n\t\t\t<input type=\"text\" id=\"fixInput\" oninput=\"gameInstance.Module.asmLibraryArg._FixInputUpdate()\" onblur=\"gameInstance.Module.asmLibraryArg._FixInputOnBlur()\" style=\"font-size: 42px;\">\r\n\t\t\r\n\t
\r\n\t<div class=\"webgl-content\">";

<input type="text" id="fixInput" oninput="gameInstance.Module.asmLibraryArg._FixInputUpdate()" onblur="gameInstance.Module.asmLibraryArg._FixInputOnBlur()" style="font-size: 42px;">

v2k commented 4 years ago

Thanks for this!