click_handler: Fix bug in intro_reply hotspot.

This bug was caught thanks to the earlier commit which
introduces the "Restart tutorial" feature. To reproduce
the bug,

    1. Restart tutorial
    2. Click "Got it!" on the intro_reply hotspot
    3. Repeat steps 1 and 2

The hotspot for intro_reply won't disappear the second
time around and the intro_stream hotspot would be displayed
simultaneously.

The reason for this was the intro_reply's "Got it!"
button codepath never removing the item completely from
the DOM. This would then conflict with the new intro_reply
hotspot which would get assigned a different 'id'.
This commit is contained in:
Sumanth V Rao
2020-12-20 19:32:48 +05:30
committed by Tim Abbott
parent 540cca595c
commit caa7548c4a

View File

@@ -921,6 +921,7 @@ exports.initialize = function () {
hotspots.post_hotspot_as_read("intro_reply"); hotspots.post_hotspot_as_read("intro_reply");
hotspots.close_hotspot_icon($("#hotspot_intro_reply_icon")); hotspots.close_hotspot_icon($("#hotspot_intro_reply_icon"));
$("#hotspot_intro_reply_icon").remove();
}); });
// stop propagation // stop propagation