CSSTUDIO-3374 Set border of model_root in Display Editor when it is focused directly using CSS
#3494
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

This pull request implements the setting of the blue border when Display Editor is focused directly using CSS instead of using an event handler to manually add and remove a style class.
The background for this pull request is that I am currently developing a new widget for Phoebus that displays a Waterfall Plot. When selecting an instance of the new Waterfall Plot Widget and then clicks on the background of the OPI (so that
model_rootis selected), the CPU usage goes constantly to over 100%. Through debugging, I have concluded that the cause is the event handler onmodel_rootthat adds and removes the CSS style class that sets the border ofmodel_rootin order to indicate that it is selected.This pull request removes the event handler and replaces it with a CSS implementation of
widget_pane:focused. I think this is an improvement over the implementation using an event handler, while it at the same time solves the performance issue I encounter.