Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] mass_mailing: scroll in iframe mass_mailing form #164666

Closed
wants to merge 1 commit into from

Conversation

Mtaylorr
Copy link
Contributor

@Mtaylorr Mtaylorr commented May 7, 2024

Issue:

We can't scroll in iframe using the mouse (no scroll available)

Steps to reproduce the issue:

  • Install events, mass_mailing
  • Go to any event and click invite
  • Choose any template
  • You can't scroll inside the template

Origin of the issue:

Many other apps inherits the view with id view_mail_mass_mailing_form
and not the view with id mailing_mailing_view_form_full_width which
have the logic of resizing the iframe to the length of its content
(introduced here 1) so we don't really need to scroll inside the
iframe. But for the other apps since they inherit from the first
mentioned view, they will have the iframe class .o_mass_mailing_iframe
but we specified in mass_mailing.ui.scss file that html that have that
class we don't assign overflow:visible to them , that's why we can't
scroll inside the iframe.

Solution:

There are a lof of ways to solve this problem but most of them needs an
xml change which requires an update of the module. The current solution
is to add a special class to the full_width view using js from it's
already defined js_class and then we exclude it from the scss selector.

opw-3897165

@robodoo
Copy link
Contributor

robodoo commented May 7, 2024

Pull request status dashboard.

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 7, 2024
@Mtaylorr Mtaylorr marked this pull request as ready for review May 7, 2024 09:35
@C3POdoo C3POdoo requested review from a team May 7, 2024 09:38
@reth-odoo
Copy link
Contributor

Seems legit to me, I would mention 8a74c1f in the commit message as it's not really clear how it's supposed to work without the original context.

@dmo-odoo
Copy link
Contributor

"You can scroll inside the template" you mean can't, right?

Issue:
=====
We can't scroll in iframe using the mouse (no scroll available)

Steps to reproduce the issue:
=============================
- Install events, mass_mailing
- Go to any event and click invite
- Choose any template
- You can't scroll inside the template

Origin of the issue:
====================
Many other apps inherits the view with id `view_mail_mass_mailing_form`
and not the view with id `mailing_mailing_view_form_full_width` which
have the logic of resizing the iframe to the length of its content
(introduced here [1]) so we don't really need to scroll inside the
iframe. But for the other apps since they inherit from the first
mentioned view, they will have the iframe class `.o_mass_mailing_iframe`
but we specified in mass_mailing.ui.scss file that html that have that
class we don't assign `overflow:visible` to them , that's why we can't
scroll inside the iframe.

Solution:
=========
There are a lof of ways to solve this problem but most of them needs an
xml change which requires an update of the module. The current solution
is to add a special class to the full_width view using js from it's
already defined js_class and then we exclude it from the scss selector.

opw-3897165

[1]: odoo@8a74c1f
@Mtaylorr
Copy link
Contributor Author

@reth-odoo , @dmo-odoo , I updated the commit message and fixed the typos, let me know what you think , thanks !

@dmo-odoo
Copy link
Contributor

dmo-odoo commented May 28, 2024

This PR is adding a new "full width" class to mass_mailing even though two already exist: o_mass_mailing_form_full_width and o_mailing_mailing_view_form_full_width_view. Did you know it? Just making sure we're not adding an extra one for no real reason when the bug could be solved using one of the existing ones.

The iframe itself is not aware of whether its parent component is in full width or not.

@dmo-odoo
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request May 28, 2024
Issue:
=====
We can't scroll in iframe using the mouse (no scroll available)

Steps to reproduce the issue:
=============================
- Install events, mass_mailing
- Go to any event and click invite
- Choose any template
- You can't scroll inside the template

Origin of the issue:
====================
Many other apps inherits the view with id `view_mail_mass_mailing_form`
and not the view with id `mailing_mailing_view_form_full_width` which
have the logic of resizing the iframe to the length of its content
(introduced here [1]) so we don't really need to scroll inside the
iframe. But for the other apps since they inherit from the first
mentioned view, they will have the iframe class `.o_mass_mailing_iframe`
but we specified in mass_mailing.ui.scss file that html that have that
class we don't assign `overflow:visible` to them , that's why we can't
scroll inside the iframe.

Solution:
=========
There are a lof of ways to solve this problem but most of them needs an
xml change which requires an update of the module. The current solution
is to add a special class to the full_width view using js from it's
already defined js_class and then we exclude it from the scss selector.

opw-3897165

[1]: 8a74c1f

closes #164666

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
@robodoo robodoo closed this May 28, 2024
@fw-bot fw-bot deleted the 16.0-opw-3897165-macr branch June 11, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants