Fix - Positioning the popover on scrollable elements

* (feat) - add getter for steps property

* (feat) - add setter for steps property / remove duplicate typing

* (fix) - remove duplicated 'currentModePrevented' type

* (fix) - merge

* merge fix

* (fix) - move all methods after scroll detection - success !

* Refactor highlighting active element
This commit is contained in:
raphael22
2019-02-07 23:40:03 +04:00
committed by Kamran Ahmed
parent 57a6dc5258
commit 1aaaaa044e
2 changed files with 8 additions and 6 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -5
View File
@@ -190,15 +190,17 @@ export default class Element {
* @public
*/
onHighlighted() {
this.showPopover();
this.showStage();
this.addHighlightClasses();
const highlightedElement = this;
if (!highlightedElement.isInView()) {
highlightedElement.bringInView();
}
// Show the popover and stage once the item has been
// brought in the view, this would allow us to handle
// the cases where the container has scroll overflow
this.showPopover();
this.showStage();
this.addHighlightClasses();
if (this.options.onHighlighted) {
this.options.onHighlighted(this);