From cca8c9f5c6ef0090c8e4e2d26f002464124a98cb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Oct 2025 18:53:16 +0000 Subject: [PATCH 1/2] Initial plan From 731be86a8ac111e54527791cdfabe30c82cfa193 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Oct 2025 19:00:59 +0000 Subject: [PATCH 2/2] Fix embedded google forms refreshing on scroll The issue was that formUrl() method was being called on every Angular change detection cycle (triggered by scrolling). This caused the sanitizer to create a new object reference each time, which Angular interpreted as a change, causing the iframe to reload. Solution: Compute and sanitize the URL once in ngOnInit() and store it in a property. The template now binds directly to the property instead of calling a method, preventing unnecessary re-renders. Co-authored-by: AlaqmarG <117380848+AlaqmarG@users.noreply.github.com> --- .../shared/form/google-form/google-form.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/shared/form/google-form/google-form.component.ts b/src/app/shared/form/google-form/google-form.component.ts index 0a9edaea..f0ad1184 100644 --- a/src/app/shared/form/google-form/google-form.component.ts +++ b/src/app/shared/form/google-form/google-form.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { DomSanitizer } from '@angular/platform-browser'; +import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; @Component({ selector: 'csc-google-form', @@ -8,7 +8,7 @@ import { DomSanitizer } from '@angular/platform-browser';