pwa-studio icon indicating copy to clipboard operation
pwa-studio copied to clipboard

[bug]: Unable to execute javascript tags which added in block in PWA Venia

Open RanjitBShinde opened this issue 1 year ago • 6 comments

  1. Login to Magento Admin
  2. Create or Edit block, add html element and add any javascript in that
  3. Add that block in footer or somewhere in page
  4. Goto PWA Venia frontend and check, javascript is loading but it is not executable.

RanjitBShinde avatar Mar 25 '24 14:03 RanjitBShinde

Hi @RanjitBShinde. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information. Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

m2-assistant[bot] avatar Mar 25 '24 14:03 m2-assistant[bot]

Hi

  1. Login to Magento Admin

  2. Click create page, add html element Button and add script tag and inside script add click button functionality

  3. Goto PWA local fronend and check, button is displaying but click button functionality not working , it means script not working

  4. Issue is producible in PWA

But

  1. Login to Magento Admin
  2. Click create page, add html element Button and add script tag and inside script add click button functionality
  3. After create page there is 3 options .delete ,edit, view
  4. When we click view option
  5. Page is open in another window. button is displaying click button functionality is working fine
  6. Issue is not producible from Magento Admin

glo85315 avatar Apr 05 '24 06:04 glo85315

@glo85315 in luma theme it works. Issue is about PWA venia.

RanjitBShinde avatar Apr 05 '24 07:04 RanjitBShinde

@adobe export issue to JIRA project PWA as Bug

glo42707 avatar Apr 19 '24 05:04 glo42707

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/PWA-3260 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Apr 19 '24 05:04 github-jira-sync-bot

Hi @RanjitBShinde , Thank you for reaching out to us regarding the JavaScript execution issue with Magento's PWA Venia storefront. After thorough investigation, we've discovered that React's security measures prevent the execution of JavaScript within static blocks, as it sanitizes HTML content, including script tags.

Unfortunately, due to this limitation within the React framework, we regret to inform you that we won't be able to proceed with your ticket as originally anticipated. We understand the importance of this functionality to you and apologize for any inconvenience this may cause.

If you have any further questions or concerns, please don't hesitate to reach out to us. We're here to help in any way we can.

glo85315 avatar May 27 '24 09:05 glo85315

As we have no update on this ticket for more than 14 days , Hence we are closing this ticket. Please feel free to reopen in case of any update.

glo82145 avatar Jul 04 '24 08:07 glo82145