1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-30 11:40:08 +02:00

[ticket/11795] Redo form elements auto-focus

Use data-focus attribute for forms to focus elements
when document is loaded instead of adding JavaScript

PHPBB3-11795
This commit is contained in:
Vjacheslav Trushkin
2013-08-16 18:20:00 +03:00
parent 235e3f5595
commit 605cd0cafb
3 changed files with 12 additions and 25 deletions

View File

@@ -1,16 +1,8 @@
<!-- INCLUDE overall_header.html -->
<script type="text/javascript">
// <![CDATA[
onload_functions.push(function () {
document.getElementById("keywords").focus();
});
// ]]>
</script>
<h2 class="solo">{L_SEARCH}</h2>
<form method="get" action="{S_SEARCH_ACTION}">
<form method="get" action="{S_SEARCH_ACTION}" data-focus="keywords">
<div class="panel">
<div class="inner">