mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-25 16:12:37 +00:00
"Added onKeyPress event handler to zoom input and page number input to blur the target on Enter key press."
This commit is contained in:
@@ -90,6 +90,11 @@ const ToolBar = ({ updateZoom, currentPage, onPageChange, totalPages }) => {
|
||||
updateZoom(newZoomLevel);
|
||||
}
|
||||
}}
|
||||
onKeyPress={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.target.blur();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<span>%</span>
|
||||
</div>
|
||||
@@ -128,6 +133,11 @@ const ToolBar = ({ updateZoom, currentPage, onPageChange, totalPages }) => {
|
||||
parseInt(pageNumberInput) === state.currentPage + 1 ||
|
||||
onPageChange(parseInt(pageNumberInput) - 1);
|
||||
}}
|
||||
onKeyPress={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.target.blur();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="tool">
|
||||
|
||||
Reference in New Issue
Block a user