Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

iframe scroll issue

Avatar

Avatar
Validate 1
Level 1
surajitk1518267
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
surajitk1518267
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
surajitk1518267
Level 1

02-06-2021

We need to add a iframe in the page and inside iframe we are calling a website which has functionality to zoom in & out.

But as soon we try to zoom in / out using mouse scroll inside iframe, main page start scrolling.

We tried to add the functionality of scrolling="no" but it doesn't work.

We have only below options to edit

Kindly suggest.

iframe called is https://kiger.renault.co.in/#/car/360/kiger

Functionality where it was not working is https://www.renault.co.in/cars/renault-kiger.html

iframe AEM.jpg

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

611 likes

Total Posts

588 posts

Correct Reply

230 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

611 likes

Total Posts

588 posts

Correct Reply

230 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

02-06-2021

@surajitk1518267,

if the AEM out of the box iframe component is causing too many issues, I suggest that you would create your own iframe component. 

Example code I found online looks helpful, https://stackoverflow.com/questions/39398787/stop-scrolling-on-zoomable-iframe

 

Answers (1)

Answers (1)

Avatar

Avatar
Boost 5
Level 5
Ritesh_M
Level 5

Likes

85 likes

Total Posts

73 posts

Correct Reply

24 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Boost 5
Level 5
Ritesh_M
Level 5

Likes

85 likes

Total Posts

73 posts

Correct Reply

24 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
Ritesh_M
Level 5

02-06-2021

 
 

Hi @surajitk1518267 ,

 

You can lock the scroll when user clicks inside div containing  iframe and the same can be unlocked when user clicks outside of iframe div. I think that should help you (assuming scroll lock will not lock iframe contained website). Please see below example -

 

https://stackoverflow.com/questions/21315306/how-to-stop-window-scroll-after-specific-event/21315466

 

lock-scroll.png