fix: preserve tooltip placement state
This commit is contained in:
1 parent
dbb9ccaef4
commit
060eb86e85
1 file changed
+3
@@ -148,6 +148,7 @@
|
||||
panelTop = Math.max(safeInset, Math.min(panelTop, viewport.height - safeInset - panelHeight));
|
||||
|
||||
panel.dataset.tooltipPlacement = placement;
|
||||
state.wrap.dataset.tooltipPlacement = placement;
|
||||
panel.style.left = `${Math.round(panelLeft)}px`;
|
||||
panel.style.top = `${Math.round(panelTop)}px`;
|
||||
setArrowOffset(state, placement, panelLeft, panelTop, panelWidth, panelHeight);
|
||||
@@ -215,6 +216,8 @@
|
||||
focused: false,
|
||||
dismissed: false,
|
||||
};
|
||||
wrap.dataset.tooltipInit = 'true';
|
||||
wrap.dataset.tooltipPlacement = 'bottom';
|
||||
states.set(wrap, state);
|
||||
ensureAccessibility(state);
|
||||
setOpenState(state, false);
|
||||
|
||||
Reference in new issue
Block a user