0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 18:02:42 +00:00

select text when clicking into page input

This commit is contained in:
Gazook89
2024-08-24 09:08:19 -05:00
parent 3acf90dfdb
commit 690c683943

View File

@@ -103,6 +103,7 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{
inputMode='numeric'
pattern='[0-9]'
value={pageNum}
onClick={(e)=>{e.target.select()}}
onChange={(e)=>{handlePageChange(e.target.value);}}
onBlur={()=>scrollToPage(pageNum)}
onKeyDown={(e)=>{e.key == 'Enter' ? scrollToPage(pageNum) : null;}}