fix(apk): entrer dans un champ place le curseur a la fin du texte
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user