mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-14 11:05:47 +05:00
fix: write autofocus code using oncreate lifecycle method instead of doing in html
This commit is contained in:
parent
12e09b3c26
commit
e2603ea2b6
@ -65,6 +65,7 @@ function loginComponent() {
|
||||
id: 'password',
|
||||
type: 'password',
|
||||
placeholder: 'Password',
|
||||
oncreate: (e) => e.dom.focus(),
|
||||
onchange: (e) => (passwd = e.target.value),
|
||||
onkeydown: (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
<script type="text/javascript">
|
||||
function load_ui() {
|
||||
var main = require('main');
|
||||
document.getElementById('password').focus();
|
||||
}
|
||||
</script>
|
||||
<noscript>Sorry but JavaScript is needed here! Please enable it in your browser.</noscript>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user