58ec5f37f42ec310b284772611f9bb3e9f7f7d6c kate Tue Jun 3 11:36:52 2014 -0700 Fix a few double eq/noteqs not found by jshint diff --git src/hg/js/autocomplete.js src/hg/js/autocomplete.js index 3d9da30..86b336c 100644 --- src/hg/js/autocomplete.js +++ src/hg/js/autocomplete.js @@ -87,31 +87,31 @@ }, select: function(event, ui) { selectCallback(ui.item); lastSelected = ui.item.value; suggestBox.updateFindMatches(ui.item.internalId); // jQuery('body').css('cursor', 'wait'); // document.TrackHeaderForm.submit(); } }); } // I want to set focus to the suggest element, but unforunately that prevents PgUp/PgDn from // working, which is a major annoyance. // $('#positionInput').focus(); $("#positionInput").change(function(event) { - if (!lastSelected || lastSelected != $('#positionInput').val()) { + if (!lastSelected || lastSelected !== $('#positionInput').val()) { // This handles case where user typed or edited something rather than choosing from a suggest list; // in this case, we only change the position hidden; we do NOT update the displayed coordinates. var val = $('#positionInput').val(); if (!val || val.length === 0 || val === waterMark) // handles case where users zeroes out positionInput; in that case we revert to currently displayed position val = $('#positionDisplay').text(); $('#position').val(val); suggestBox.clearFindMatches(); } }); $("#positionDisplay").click(function(event) { // this let's the user click on the genomic position (e.g. if they want to edit it) clickCallback($(this).text()); $('#positionInput').val($(this).text()); suggestBox.clearFindMatches();