Skip to content

Commit

Permalink
Merge pull request #214 from IGNF/fix-map-focus-if-input-focus
Browse files Browse the repository at this point in the history
fix(search): perte du focus dès que la souris survole la carte
  • Loading branch information
elias75015 authored May 22, 2024
2 parents 0be6823 + c7a4aee commit a86cdf7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/carte/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ onMounted(() => {
* Trigerred on mouse over
*/
const onFocusOnMap = () => {
mapRef.value.focus();
// Si le focus est actuellement sur une balise <input>, on ne change pas de focus
if (document.activeElement.tagName !== "INPUT") {
mapRef.value.focus();
}
}
// rendre disponible 'map' aux composants enfants imbriqués
Expand Down

0 comments on commit a86cdf7

Please sign in to comment.