mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 06:38:07 +02:00
Give all HTML button elements a type
The HTML button elements we use are all regular buttons that don't submit form data to a server. According to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#notes those buttons should all have their type set to `button` explicitly, but we only do that a handful of them. This commit fixes the issue by consistently giving all our buttons the `button` type. Co-authored-by: Calixte Denizet <calixte.denizet@gmail.com>
This commit is contained in:
parent
8f45374881
commit
f1f58bbe67
5 changed files with 58 additions and 58 deletions
|
@ -9,8 +9,8 @@
|
|||
<h1>'Previous/Next' example</h1>
|
||||
|
||||
<div>
|
||||
<button id="prev">Previous</button>
|
||||
<button id="next">Next</button>
|
||||
<button id="prev" type="button">Previous</button>
|
||||
<button id="next" type="button">Next</button>
|
||||
|
||||
<span>Page: <span id="page_num"></span> / <span id="page_count"></span></span>
|
||||
</div>
|
||||
|
|
|
@ -43,13 +43,13 @@ limitations under the License.
|
|||
</div>
|
||||
|
||||
<footer>
|
||||
<button class="toolbarButton pageUp" title="Previous Page" id="previous"></button>
|
||||
<button class="toolbarButton pageDown" title="Next Page" id="next"></button>
|
||||
<button class="toolbarButton pageUp" title="Previous Page" id="previous" type="button"></button>
|
||||
<button class="toolbarButton pageDown" title="Next Page" id="next" type="button"></button>
|
||||
|
||||
<input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1">
|
||||
|
||||
<button class="toolbarButton zoomOut" title="Zoom Out" id="zoomOut"></button>
|
||||
<button class="toolbarButton zoomIn" title="Zoom In" id="zoomIn"></button>
|
||||
<button class="toolbarButton zoomOut" title="Zoom Out" id="zoomOut" type="button"></button>
|
||||
<button class="toolbarButton zoomIn" title="Zoom In" id="zoomIn" type="button"></button>
|
||||
</footer>
|
||||
|
||||
<script src="viewer.mjs" type="module"></script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue