Greasmoney text inject fix into reactjs website

Job ID: 30878459

Budget: €8 – €30 EUR

i have a simple greasmonkey/tampermonkey script.
On a particular website my script insert a login and password text and click on submit button.
Here is the problem.
The website is coded in reactjs and i can insert login/password in text field correct but when i click submit button it seems nothing was inserted, it seems like change event was not fired.
I tried to manually fire a lot of events (change, keypress) but nothing seems to work.
I need a fix or workaround.
Will comunicate the website address to the winner.

if(url.indexOf("xxxx") > -1) { // login page
waitForElement("button[type='submit']",function() { // just wait will page is loaded
$("#Login").val("mylogin");
$("#Password").val("mypassword");
$("button[type='submit']").click();
});
}

function waitForElement(elementPath, callBack){
window.setTimeout(function(){
if($(elementPath).length){
callBack(elementPath, $(elementPath));
}else{
waitForElement(elementPath, callBack);
}
},500)
}