rn-tourguide icon indicating copy to clipboard operation
rn-tourguide copied to clipboard

Tooltip is shown for a split second, disappears, and then only showing properly

Open wegory opened this issue 4 years ago • 5 comments

The default tooltip flickers before fading in. Moving this.state.opacity.setValue(0) to before this.props.next() solved it for me. Not sure if it causes any problems elsewhere.

wegory avatar Sep 03 '20 12:09 wegory

Can you provide a PR ?

xcarpentier avatar Sep 03 '20 12:09 xcarpentier

is this issue fixed?

McSam94 avatar Jun 15 '21 05:06 McSam94

Experiencing the same issue. Any fix for this?

[EDIT] Moving this.state.opacity.setValue(0) to before this.props.next() solved it for me. Not sure if it causes any problems elsewhere. (WORKED FOR ME)

palaganaskurl avatar Aug 02 '21 16:08 palaganaskurl

Go into node_modules/rn-tourguide/lib/components/Modal.js. In this.handleNext function add this.state.opacity.setValue(0) before this.props.next().

Lecklark avatar Mar 06 '22 06:03 Lecklark

Here is the diff:

diff --git a/node_modules/rn-tourguide/lib/components/Modal.js b/node_modules/rn-tourguide/lib/components/Modal.js
index f848302..e1d65dd 100644
--- a/node_modules/rn-tourguide/lib/components/Modal.js
+++ b/node_modules/rn-tourguide/lib/components/Modal.js
@@ -26,6 +26,7 @@ let Modal = (() => {
                 this.layout = layout;
             };
             this.handleNext = () => {
+               this.state.opacity.setValue(0);
                 this.props.next();
             };
             this.handlePrev = () => {
@@ -130,7 +131,7 @@ let Modal = (() => {
                 delay: duration,
                 useNativeDriver: true,
             });
-            this.state.opacity.setValue(0);
+
             if (toValue !== this.state.tooltipTranslateY._value &&
                 !((_a = this.props.currentStep) === null || _a === void 0 ? void 0 : _a.keepTooltipPosition)) {
                 Animated.parallel([translateAnim, opacityAnim]).start();

You can use https://www.npmjs.com/package/patch-package as it doesn't look like this is getting updated any time.

leecrossley avatar Jul 21 '22 23:07 leecrossley