gchq / gchq/CyberChef

Bug report: Forking breaks highlighting for regular expression and other operations

Open
#1,359 2 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
JavaScript
Stars
35.8k
Forks
4.1k
Avg merge
2d 26m
Merged PRs (30d)
33

Description

**Describe the bug**
On Chrome, Firefox and Edge it appears that when you apply fork, a subsequent regex doesn't perform match highlighting as per screenshots below

**To Reproduce**

Write simple input and apply regex looking for string 'test'. Highlighting is applied

![image](https://user-images.githubusercontent.com/39072319/169687550-20933bfe-e1b7-4dac-948c-5f13448b3393.png)

Fork the same input and the highlight will disappear / not be applied

![image](https://user-images.githubusercontent.com/39072319/169687562-c4a81781-07a4-4aa5-b46b-99863c5db387.png)

This also appears to break text highlights for selecting text

![image](https://user-images.githubusercontent.com/39072319/169687820-3322b060-a8a3-415a-b924-a56357896d6e.png)

And forked:

![image](https://user-images.githubusercontent.com/39072319/169687836-8f7c8e12-7fc8-42de-a1b5-18fae7820c72.png)

**Expected behaviour**
Highlight of regex matches or selected text should occur regardless of fork operation being applied. I wonder if it relates to: https://github.com/gchq/CyberChef/issues/267

**Screenshots**
As above

**Desktop (if relevant, please complete the following information):**
* Version: 9.37.3
* Compile time: 14/04/2022 17:10:14 UTC
* User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36

Thank you!

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by applying a regex and text selection before and after using fork in Chrome, Firefox, or Edge. Trace the fork operation and the highlighting behavior, then verify that regex matches and selected text remain highlighted after forking.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.