Commit 05b89f05 by Jareer Ahsan

Quality fix, == to ===

parent 793622b4
...@@ -55,7 +55,7 @@ $(document).ready(function() { ...@@ -55,7 +55,7 @@ $(document).ready(function() {
} }
// if up arrow key pressed or shift+tab else down key or tab is pressed // if up arrow key pressed or shift+tab else down key or tab is pressed
if (event.which == 38 || (event.which == 9 && event.shiftKey)) { if (event.which === 38 || (event.which === 9 && event.shiftKey)) {
// if first item go to last // if first item go to last
if (focusedItemIndex === 0) { if (focusedItemIndex === 0) {
menuItems.last().focus(); menuItems.last().focus();
...@@ -64,9 +64,9 @@ $(document).ready(function() { ...@@ -64,9 +64,9 @@ $(document).ready(function() {
menuItems.get(itemToFocusIndex).focus(); menuItems.get(itemToFocusIndex).focus();
} }
event.preventDefault(); event.preventDefault();
} else if (event.which == 40 || event.which == 9) { } else if (event.which === 40 || event.which === 9) {
// if last item go to first // if last item go to first
if (focusedItemIndex == numberOfMenuItems - 1) { if (focusedItemIndex === numberOfMenuItems - 1) {
menuItems.first().focus(); menuItems.first().focus();
} else { } else {
itemToFocusIndex = focusedItemIndex + 1; itemToFocusIndex = focusedItemIndex + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment