[FIX] website_slides: hide suggested slides page slide when click prev
Step to reproduce:
- Install `Elearning` module
- Go to any course and a content as document
- Upload a pdf with more than 1 page
- Go to the website and click on the course then on the content with
the document
- Go to last page and click on next button (should display suggested
slides page)
- Click on previous button
Issue:
Page displayed is not the last one, but the one before.
Cause:
When clicking on the previous button, the current page is still the
last page (just with the suggested slides page on top of it as
overlay), and therefore will decrease it to the page number before
last page (nb last page - 1).
Solution:
When clicking on previous button, if we are on the suggested slides
page (by checking if overlay is not hidden since no attribute is set
on `EmbeddedViewer` to know if we are on that page), hide it.
opw-3482712
closes odoo/odoo#135326
Signed-off-by:
Nasreddin Boulif (bon) <bon@odoo.com>
Loading