From c2833b9fe198d3109b5714ab1aabe81305a342dc Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Fri, 14 Jan 2022 14:45:33 +0100 Subject: [PATCH 1/5] remember click --- libs/remix-ui/permission-handler/src/lib/permission-dialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/permission-handler/src/lib/permission-dialog.tsx b/libs/remix-ui/permission-handler/src/lib/permission-dialog.tsx index 5d7928b2f4..f1e4c1a6da 100644 --- a/libs/remix-ui/permission-handler/src/lib/permission-dialog.tsx +++ b/libs/remix-ui/permission-handler/src/lib/permission-dialog.tsx @@ -56,7 +56,7 @@ const PermissionHandlerDialog = (props: PermissionHandlerProps) => {
{rememberSwitch()} - +
From d1f2a6b84fa2bcc7518dcfac130998540d034ccd Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 17 Jan 2022 13:07:51 +0530 Subject: [PATCH 2/5] slash in input box handled --- .../src/lib/solidity-unit-testing.tsx | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx index 2acb1ee4e4..c8952801f8 100644 --- a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx +++ b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx @@ -167,15 +167,7 @@ export const SolidityUnitTesting = (props: Record) => { // eslint-d const handleTestDirInput = async (e: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any let testDirInput = trimTestDirInput(e.target.value) testDirInput = helper.removeMultipleSlashes(testDirInput) - if (testDirInput !== '/') testDirInput = helper.removeTrailingSlashes(testDirInput) setInputPathValue(testDirInput) - if (e.key === 'Enter') { - if (await testTabLogic.pathExists(testDirInput)) { - testTabLogic.setCurrentPath(testDirInput) - await updateForNewCurrent() - return - } - } if (testDirInput) { if (testDirInput.endsWith('/') && testDirInput !== '/') { testDirInput = helper.removeTrailingSlashes(testDirInput) @@ -205,17 +197,6 @@ export const SolidityUnitTesting = (props: Record) => { // eslint-d } } - const handleEnter = async (e: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any - let inputPath = e.target.value - inputPath = helper.removeMultipleSlashes(trimTestDirInput(inputPath)) - setInputPathValue(inputPath) - if (disableCreateButton) { - if (await testTabLogic.pathExists(inputPath)) { - await setCurrentPath(inputPath) - } - } - } - const handleCreateFolder = async () => { let inputPath = trimTestDirInput(inputPathValue) let path = helper.removeMultipleSlashes(inputPath) @@ -674,8 +655,7 @@ export const SolidityUnitTesting = (props: Record) => { // eslint-d title="Press 'Enter' to change the path for test files." style={{ backgroundImage: "var(--primary)" }} onKeyDown={() => { if (inputPathValue === '/') setInputPathValue('')} } - onKeyUp={handleTestDirInput} - onChange={handleEnter} + onChange={handleTestDirInput} onClick = {() => { if (inputPathValue === '/') setInputPathValue('')} } />