You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Control-bar autohide when cursor placed over it #5258 (#5692)
Listen to 'mouseenter' and 'mouseleave' events when triggered in the control-bar and temporarily sets inactivity timeout to zero before restoring it.
Closes#5258
@@ -2026,3 +2027,26 @@ QUnit.test('setting all children to false, does not cause an assertion', functio
2026
2027
player.dispose();
2027
2028
assert.ok(true,'did not cause an assertion');
2028
2029
});
2030
+
2031
+
QUnit.test('controlBar behaviour with mouseenter and mouseleave events',function(assert){
2032
+
2033
+
constplayer=TestHelpers.makePlayer();
2034
+
2035
+
player.listenForUserActivity_();
2036
+
2037
+
assert.equal(player.options_.inactivityTimeout,2000,'inactivityTimeout default value is 2000');
2038
+
2039
+
constel=player.getChild('controlBar').el();
2040
+
2041
+
// move mouse to controlBar
2042
+
Events.trigger(el,'mouseenter');
2043
+
2044
+
assert.equal(player.options_.inactivityTimeout,0,'mouseenter on control-bar, inactivityTimeout is set to 0');
2045
+
2046
+
// move mouse out of controlBar bounds
2047
+
Events.trigger(el,'mouseleave');
2048
+
2049
+
assert.equal(player.options_.inactivityTimeout,player.cache_.inactivityTimeout,'mouse leaves control-bar, inactivityTimeout is set to default value (2000)');
0 commit comments