]> _ Git - fluidbook-html5.git/commitdiff
Fix #1712 @0.5
authorStephen Cameron <stephen@cubedesigners.com>
Tue, 3 Oct 2017 13:53:49 +0000 (15:53 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Tue, 3 Oct 2017 13:53:49 +0000 (15:53 +0200)
js/libs/fluidbook/fluidbook.help.js
js/libs/fluidbook/fluidbook.nav.js

index 1a739ebeede25fd7f02c4d06a3955d6accb6b77c..c5812f8254bed7c46180724067e45317f5afb6fd 100644 (file)
@@ -64,7 +64,7 @@ FluidbookHelp.prototype = {
                                return;\r
                        }\r
 \r
-                       var icon = $(this).find('.nav-icon');\r
+                       var icon = $(this).find('.nav-icon:visible:first'); // Must get first visible icon so "toggle" icons work\r
                        var offset = icon.offset();\r
                        var left;\r
 \r
index 0bec1bce4e7c55a9c0e93fea049f07cd48ad2d34..216732048ff24925cc1dc4da3417d019c45d03a2 100644 (file)
@@ -548,7 +548,10 @@ FluidbookNav.prototype = {
         // Toggle icon on fullscreen change (also handles exiting via ESC key)
         if (screenfull.enabled) {
             screenfull.on('change', function() {
-                $('.icon-fullscreen').toggleClass('active');
+                // Slight delay to stop icon state flickering during fullscreen transition
+                setTimeout(function () {
+                    $('.icon-fullscreen').toggleClass('active');
+                }, 250);
             });
         }