mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 23:22:42 +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);
|
updateZoom(newZoomLevel);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
onKeyPress={(e) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
e.target.blur();
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<span>%</span>
|
<span>%</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -128,6 +133,11 @@ const ToolBar = ({ updateZoom, currentPage, onPageChange, totalPages }) => {
|
|||||||
parseInt(pageNumberInput) === state.currentPage + 1 ||
|
parseInt(pageNumberInput) === state.currentPage + 1 ||
|
||||||
onPageChange(parseInt(pageNumberInput) - 1);
|
onPageChange(parseInt(pageNumberInput) - 1);
|
||||||
}}
|
}}
|
||||||
|
onKeyPress={(e) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
e.target.blur();
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="tool">
|
<div className="tool">
|
||||||
|
|||||||
Reference in New Issue
Block a user