You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix editor reloads, Safari hotspots and raw-edit cancellation - #308
Saving changes could keep a stale editor snapshot, Safari could miss node/note hotspots after scrolling, and cancelling raw edits closed the properties dialog. Refresh the saved document correctly, resolve Safari hotspots in logical coordinates and return Cancel/close to the originating properties without losing its unsaved fields.
PHP 8.3 isolated Cacti-layout fixture: 292 tests / 5,894 assertions; editor reload, Safari hotspots, raw Cancel and context-menu browser checks. PHP/JavaScript syntax, whitespace and release manifest checks pass.
Coverage was not measured in this local run; current CI and review results must be checked separately.
The reload regression directly loads the editor navigation helpers through a guarded CommonJS export, with no dynamic source evaluation. Reload, return-navigation and context-menu DOM fixtures pass.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Focus restoration targets nonfocusable production anchors, while the regression fixture substitutes focusable buttons.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Make link_edit and node_edit controls programmatically focusable
js/editor.js:1398
The production #link_edit and #node_edit controls are <a> elements without href or tabindex (weathermap-cacti-plugin-editor.php:514,643), so this call cannot focus them when Cancel, Escape or Close returns to properties. Make the targets programmatically focusable before restoring focus. Also use the production anchor markup in ConfigCancelTest.cjs: its focusable <button> substitutes currently hide this failure.
Addressed the latest summary-only focus finding in 4bc9aea. Returning from raw configuration makes the production anchor controls programmatically focusable before restoring focus. ConfigCancelTest now uses the same href-less anchor markup, rather than focusable button substitutes; it fails before this repair and passes after. Cancel/close preserve drafts and navigation remains closed. The full PHP suite passes (292 tests / 5,894 assertions).
These repairs update the PR branch only; the live server has not been changed. New GitHub checks are separate from the passing local validation.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Safari-specific hit detection and shared dialog lifecycle changes warrant human confirmation of browser behavior beyond the supplied static review evidence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Description
Saving changes could keep a stale editor snapshot, Safari could miss node/note hotspots after scrolling, and cancelling raw edits closed the properties dialog. Refresh the saved document correctly, resolve Safari hotspots in logical coordinates and return Cancel/close to the originating properties without losing its unsaved fields.
Related work
Follow-up to #300, #301 and #303.
Validation
PHP 8.3 isolated Cacti-layout fixture: 292 tests / 5,894 assertions; editor reload, Safari hotspots, raw Cancel and context-menu browser checks. PHP/JavaScript syntax, whitespace and release manifest checks pass.
Coverage was not measured in this local run; current CI and review results must be checked separately.
The reload regression directly loads the editor navigation helpers through a guarded CommonJS export, with no dynamic source evaluation. Reload, return-navigation and context-menu DOM fixtures pass.