diff --git a/ecrire/inc/editer_mot.php b/ecrire/inc/editer_mot.php
index 1548ee6e2de68aa2150fb63571a42d4a21d79acd..a58730874a5d90b758bb82bf92db0a6f98253e39 100644
--- a/ecrire/inc/editer_mot.php
+++ b/ecrire/inc/editer_mot.php
@@ -343,6 +343,8 @@ function formulaire_mots_cles($id_groupes_vus, $id_objet, $les_mots, $table, $ta
 // http://doc.spip.org/@menu_mots
 function menu_mots($row, $id_groupes_vus, $les_mots)
 {
+	$rand = rand(0,10000); # pour antifocus & ajax
+
 	$id_groupe = $row['id_groupe'];
 
 	$result = spip_query("SELECT id_mot, type, titre FROM spip_mots WHERE id_groupe =$id_groupe " . ($les_mots ? "AND id_mot NOT IN ($les_mots) " : '') .  "ORDER BY type, titre");
@@ -360,7 +362,7 @@ function menu_mots($row, $id_groupes_vus, $les_mots)
 
 	// forcer le recalcul du noeud car on est en Ajax
 	$jscript1 = "findObj_forcer('$ancre').style.visibility='visible';";
-	$jscript2 = "if(!antifocus_mots[$id_groupe]){this.value='';antifocus_mots[$id_groupe]=true;}";
+	$jscript2 = "if(!antifocus_mots['$rand-$id_groupe']){this.value='';antifocus_mots['$rand-$id_groupe']=true;}";
 
 	if ($n > 50) {
 		$jscript = "onfocus=\"$jscript1 $jscript2\"";