diff --git a/android-client/web/app.html b/android-client/web/app.html index 79d2a8d..6415452 100644 --- a/android-client/web/app.html +++ b/android-client/web/app.html @@ -1629,6 +1629,21 @@ function openSettings() { // https://git.example.com/OWNER/REPO (ou .../src/branch/main/FICHIER) devient // l'URL de l'API des contenus. Une URL d'API ou d'endpoint PHP passe telle quelle, // et une forme non reconnue aussi - Sync dira alors ce qui ne va pas. +// ENTRER DANS UN CHAMP MET LE CURSEUR A LA FIN. Sous Android, toucher un champ +// plus long que sa largeur pose le curseur sur le caractere touche, et la fin +// d'une URL ou d'un jeton reste hors d'atteinte. Differe : le toucher pose son +// propre curseur APRES l'evenement focus. Un second toucher place le curseur +// ou l'on veut. +document.addEventListener('focusin', function (ev) { + var el = ev.target; + if (!el.classList || !el.classList.contains('field-in')) return; + setTimeout(function () { + var n = el.value.length; + try { el.setSelectionRange(n, n); } catch (e) { return; } + el.scrollLeft = el.scrollWidth; + }, 60); +}); + function normalizeRepoUrl(u) { u = u.trim(); if (!u || /\/api\/v1\/repos\//i.test(u) || /\.php(\?|$)/i.test(u)) return u;