Conversation
Clicks inside the WYSIWYG/layout preview iframe never reach the host document, so the RUM enhancer never recorded ew-wysiwyg-doc click checkpoints. Handle the new RUM_CLICK message forwarded from the quick-edit iframe and record it on the host session's RUM via sampleRUM('click', ...). Requires the matching da-nx change that sends RUM_CLICK.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dicagno
marked this pull request as ready for review
September 25, 2026 09:12
Matches adobe/da-nx#778: the iframe now sends MESSAGE_TYPES.IFRAME_CLICK ('iframe-click') with { target?: string }. The host owns RUM attribution and adds source: 'ew-wysiwyg-doc' when calling sampleRUM. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Screen.Recording.2026-09-30.at.16.04.35.movClicking the block selection button in wysiwyg doesn't generate an event |
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Clicks inside the WYSIWYG/layout preview iframe never reach the host document, so the RUM enhancer never recorded ew-wysiwyg-doc click checkpoints. Handle the new RUM_CLICK message forwarded from the quick-edit iframe and record it on the host session's RUM via sampleRUM('click', ...). Requires the matching da-nx change that sends RUM_CLICK.
Full test URL (to check functionality end to end): https://rumclick--da-live--adobe.aem.live/canvas?rum=on&nx=rumclick&quick-edit=rumclick#/exp-workspace/frescopa/index
Then paste in devTools console:
document.addEventListener('rum', e => console.log('RUM', e.detail.checkpoint, e.detail.data));and click on any element in the quickedit, to check if click checkpoints are dispatched.Description
Adds a handler for the new
RUM_CLICKmessage on the quick-edit iframe → host port. When the WYSIWYG/layout preview iframe forwards a click, the host records it on the current session's RUM viawindow.hlx.rum.sampleRUM('click', { source, target }), producingew-wysiwyg-docclick checkpoints — the layout-surface counterpart to theew-editor-doccheckpoints the RUM enhancer already emits for the shadow-DOM source editor. It's a no-op when the session isn't RUM-selected.Pairs with the da-nx PR that sends
RUM_CLICK. Both must deploy together; until then the handler is inert (the message is never sent, and the unknown type simply never matches).Related Issue
Fixes #1324
To be merged together with adobe/da-nx#778
Motivation and Context
Click events are captured in the document/content editor (
ew-editor-doc) but not in layout mode. The layout/WYSIWYG surface renders inside a cross-origin<iframe>loaded with?rum=off, so its clicks never bubble to the host document and the host RUM enhancer cannot see them — noew-wysiwyg-doccheckpoints were ever recorded, including for in-iframe dialogs and toolbars. This restores usage telemetry for the layout surface.How Has This Been Tested?
test/unit/blocks/canvas/ew-editor-wysiwyg/quick-edit-controller.test.jsassert a forwardedRUM_CLICKcallssampleRUM('click', …)with the payload, and that it no-ops safely when RUM isn't initialised on the page. Full da-live unit suite green (2344 passed, 4 skipped).?nx=local), opened a doc in layout mode with?rum=on, and confirmed via adocument.addEventListener('rum', …)probe that clicks in the WYSIWYG canvas (and in-iframe dialogs/toolbars) emitRUM click { source: 'ew-wysiwyg-doc', … }, whileew-editor-docclicks are unchanged.Screenshots (if appropriate):
N/A
Types of changes
Checklist:
🤖 Generated with Claude Code