Skip to content

Commit f7b7d74

Browse files
committed
workaround to clear hasfocus under certain cases
1 parent 913c48b commit f7b7d74

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

earthlapse-hci/modes-menu.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// Enable focus style
88
$screen.on("mousedown", ".earthlapse-modes-menu-item, .earthlapse-modes-menu-explorebutton", function () {
99
$(this).addClass("hasfocus");
10+
}).on("mouseout", ".earthlapse-modes-menu-item, .earthlapse-modes-menu-explorebutton", function () {
11+
$(this).removeClass("hasfocus");
1012
});
1113

1214
// On selection of any tile, initiate the story

earthlapse-hci/modes-story.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@
161161
};
162162

163163
// Explain Nav Buttons
164-
$explain.on("mousedown", ".earthlapse-stories-explain-nav-button", function (e) {
164+
$explain.on("mousedown", ".earthlapse-stories-explain-nav-button", function () {
165165
$(this).addClass("hasfocus");
166+
}).on("mouseout", ".earthlapse-stories-explain-nav-button", function () {
167+
$(this).removeClass("hasfocus");
166168
}).on("mouseup", ".earthlapse-stories-explain-nav-button", function (e) {
167169
var $this = $(this);
168170

0 commit comments

Comments
 (0)