Skip to content

Commit 384110d

Browse files
authored
Merge pull request #1362 from johnhenley/issues/enter-key-quick-reply-1360
FIX: Allow Enter key in search box without interfering with other controls on page
2 parents 7fc21d3 + 81b18a0 commit 384110d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dnn.CommunityForums/config/templates/ToolbarSearchPopup.ascx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script type="text/javascript">
22
//prevent submit from Enter key
33
$(document).ready(function () {
4-
$(window).keydown(function (event) {
4+
$('.dcf-search-input').keydown(function (event) {
55
if (event.keyCode === 13) {
66
event.preventDefault();
77
return false;
@@ -25,7 +25,7 @@
2525
<div class="dcf-search-popup aftb-search-popup">
2626
<div class="dcf-search-input">
2727
<input class="dcf-search-input" type="text" placeholder="[RESX:SearchFor]" maxlength="50" onkeydown="CheckEnterPressed(this, event)">
28-
<button id="btnSearch" class="dcf-search-button">[RESX:Search]</button>
28+
<button id="btnSearch" type="submit" class="dcf-search-button">[RESX:Search]</button>
2929
</div>
3030
<div class="dcf-search-options">
3131
<a class="dcf-search-option-advanced" href="[AF:TB:AdvancedSearchURL]">[RESX:SearchAdvanced]</a>
@@ -37,4 +37,4 @@
3737
</span>
3838
</div>
3939
</div>
40-
</div>
40+
</div>

0 commit comments

Comments
 (0)