Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Copying entire code snippet on text selection #1764

Open
nawinsharma opened this issue Feb 25, 2025 · 0 comments · May be fixed by #1765
Open

bug: Copying entire code snippet on text selection #1764

nawinsharma opened this issue Feb 25, 2025 · 0 comments · May be fixed by #1765
Labels
bug Something isn't working

Comments

@nawinsharma
Copy link
Contributor

Describe the bug
When selecting any text from the code snippet section, the entire code snippet gets copied to the clipboard, instead of just the selected text.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to the code snippet section.
  2. Select a portion of the text.
  3. The entire code snippet is copied to the clipboard.

Expected behavior
Only the selected portion of the text should be highlighted.

Screenshots or GIFs

Image

code copied to clipboardL
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.13; import "forge-std/Test.sol"; import "src/BridgeETH.sol"; import "src/USDT.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract BridgeETHTest is Test { event Transfer(address indexed from, address indexed to, uint256 value); BridgeETH bridge; USDT usdt; function setUp() public { usdt = new USDT(); bridge = new BridgeETH(address(usdt)); } function test_Deposit() public { usdt.mint(0x2966473D85A76A190697B5b9b66b769436EFE8e5, 200); vm.startPrank(0x2966473D85A76A190697B5b9b66b769436EFE8e5); usdt.approve(address(bridge), 200); bridge.deposit(usdt, 200); assertEq(usdt.balanceOf(0x2966473D85A76A190697B5b9b66b769436EFE8e5), 0); assertEq(usdt.balanceOf(address(bridge)), 200); bridge.withdraw(usdt, 100); assertEq(usdt.balanceOf(0x2966473D85A76A190697B5b9b66b769436EFE8e5), 100); assertEq(usdt.balanceOf(address(bridge)), 100); } }

Info (please complete the following information):

  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@nawinsharma nawinsharma added the bug Something isn't working label Feb 25, 2025
nawinsharma added a commit to nawinsharma/cms that referenced this issue Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant