Fix flipper for confirmation element

This commit is contained in:
Tanya Fomina 2022-08-03 14:04:43 +03:00
commit 292f7fafcb
2 changed files with 16 additions and 0 deletions

View file

@ -529,6 +529,12 @@ export default class Popover extends EventsDispatcher<PopoverEvent> {
confirmationStateItemEl.classList.add(Popover.CSS.itemConfirmation);
itemEl.parentElement.replaceChild(confirmationStateItemEl, itemEl);
/**
* Reactivate flipper to make navigation work with new element
*/
this.flipper.deactivate();
this.flipper.activate(this.flippableElements);
} else {
/**
* Otherwise just add confirmation highlighting
@ -559,6 +565,12 @@ export default class Popover extends EventsDispatcher<PopoverEvent> {
confirmationStateItemEl.parentElement.replaceChild(defaultStateItemEl, confirmationStateItemEl);
defaultStateItemEl.classList.remove(Popover.CSS.itemConfirmation);
this.itemAwaitngConfirmation = null;
/**
* Reactivate flipper to make navigation work with new element
*/
this.flipper.deactivate();
this.flipper.activate(this.flippableElements);
}
/**

View file

@ -85,6 +85,10 @@
}
}
&.ce-popover__item--focused {
background: #ce4343 !important;
}
.ce-popover__item-icon {
color: var(--color-confirm);
}