Skip to content

Fix duplicated widgets and side positioning in design hover/click zones - #3572

Merged
Salvialf merged 3 commits into
jeedom:developfrom
Princeddn:fix/plan-zone-widget-position
Oct 14, 2026
Merged

Salvialf merged 3 commits into
jeedom:developfrom
Princeddn:fix/plan-zone-widget-position

Conversation

@Princeddn

Copy link
Copy Markdown
Contributor

Fixes #3571

Problème / Problem

Sur une zone de design Widget au survol :

  • le paramètre Position (Haut, Gauche, Bas, Droite…) ne fonctionne pas : le widget ne s'affiche jamais du côté choisi ;
  • le widget peut s'afficher plusieurs fois (artefacts) ou rester affiché lors d'un survol rapide.

On a design hover widget zone, the Position option has no effect, and the widget can be displayed multiple times.

Correction / Fix

Seul fichier modifié : desktop/js/plan.js. Aucune migration, aucune modification PHP ni en base.

  • Position : nouvelle fonction getZoneWidgetPosition() qui convertit la valeur enregistrée à l'affichage (right:0px → left:100%, bottom:0px → top:100%, etc.). Le widget s'affiche ainsi à l'extérieur de la zone, du côté choisi. Défaut est inchangé.
  • Doublons : le widget remplace le contenu de la zone (html(data.html) au lieu de html(data.html, true)), le style est appliqué à firstElementChild au lieu de childNodes[0], et une réponse AJAX arrivée après la sortie de la souris est ignorée.

⚠️ Impact

Les designs existants qui utilisent une position autre que Défaut afficheront désormais le widget du côté configuré.
Existing designs using a non-default position will now display the widget on the configured side.

Tests

  • Position Droite / Bas / Haut Gauche : widget affiché du bon côté.
  • Position Défaut : comportement inchangé.
  • Survol rapide répété et survol puis clic : un seul widget, aucun résidu.

Salvialf and others added 2 commits June 25, 2026 20:23
…ation

fix in case pdo hydratation set timeout to null
- Position option (Top/Left/Bottom/Right...) now displays the widget
  outside the zone on the chosen side (stored values are converted at
  display time, no migration needed). Previously 'right:0px' aligned the
  widget inside the zone, so it opened on the opposite side.
- Hover/click widget replaces zone content instead of appending it, and
  late hover responses are ignored once the mouse has left the zone,
  avoiding duplicated widgets.

Note: existing designs using a non-default position will now display
the widget on the configured side.

Fixes jeedom#3571
Comment thread desktop/js/plan.js Outdated
@Salvialf Salvialf added the changelog-breaking Use to generate release notes / changelog. To be apply on PR label Oct 14, 2026
@Salvialf Salvialf added this to the 5.0 milestone Oct 14, 2026
@Salvialf Salvialf changed the title fix(plan): zone widget position and duplicated widgets Fix duplicated widgets and side positioning in design hover/click zones Oct 14, 2026
@Salvialf
Salvialf merged commit 1c427a8 into jeedom:develop Oct 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-breaking Use to generate release notes / changelog. To be apply on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Design Zone « Widget au survol » : le paramètre Position ne fonctionne pas et le widget s'affiche en double

3 participants