🐛 Bug Report
The code formatting feature using keyboard shortcuts does not work as expected on macOS when using the Firefox browser.
To Reproduce
- Go to any problem.
- Enter any code in the right panel under </>code heading
- Attempt to format the code using the shortcut (Option + Shift + F)
- The cursor goes to the first line and disrupts the first line as shown in the snapshot.

However, the button to format the code works fine
Expected behavior
Formatted code should display correctly, either inline or in a code block.
Your Environment
- OS: macOS (Apple M3)
- Firefox 139.0.1 (aarch64)