PygmySlowLoris / vue-fab

Vue Floating Action Button
MIT License
273 stars 51 forks source link

Fixed tooltip takes effect only the second time. #14

Closed agneym closed 6 years ago

agneym commented 6 years ago

Expectation

Fixed tooltip should produce a fixed tooltip shown on hover

What actually happens

No tooltip is shown first time. From the second time, tooltip is shown.

Steps to reproduce.

  1. Set initial value of :fixed-tooltip to true. ezgif-5-29634b857b
agneym commented 6 years ago

It seems to be because of this function.

showTooltip(show) {
   if (show && this.$refs.actions && this.fixedTooltip) {
         setTimeout(() => {
            this.$refs.actions.forEach((item) => {
                  if(this.toggle) {
                     item._tooltip.show();
                  }
             });
         },700);
    }
}

this.$refs.actions is undefined until it is actually triggered for the first time. This makes it an [] Why is this check in place?

Edujugon commented 6 years ago

It's resolved in your PR #15