Guide Search On Enter Key Disable Function
已于 2023年4月11日 发布
Is there is solution to disable the search on enter key press function within Zendesk Guide?
Tried the below codes in our theme scripts but nothing seems to work:
1.
// Submit search on input enter
$quickSearch.on('keypress', (e) => {
if (e.which === 13) {
search();
}
});
});
2.
const searchBox = document.querySelector("query"); searchBox.addEventListener("keydown", (event) => { if (event.keyCode === 13) { event.preventDefault(); }});*/
3.
$( document ).ready(function() {
$(window).keydown(function(event){
if(event.keyCode == 13) {
event.preventDefault();
return false;
}
});
0
2
2 条评论
登录以发表评论。