[PAGES-146] Javascript links are being followed after preventDefault() in Preview mode Created: 11/Sep/17  Updated: 04/Jan/22  Resolved: 04/Jan/22

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: 5.5.2, 5.5.3, 5.5.4, 5.5.5, 5.5.6
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Nickolaus Wing Assignee: Unassigned
Resolution: Outdated Votes: 2
Labels: maintenance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Pages Maintenance 4
Story Points: 2

 Description   

We have noted that in the classic Preview Mode, there is javascript in the widgetset.js that is activating links after clicks. Unfortunately this javascript is not paying attention when I have already called event.preventDefault() on those links.

For example, we have an accordion content type, and headers have links in them for expanding and contracting. event.preventDefault() is called to prevent the browser from following the link (in this case href="#") and scrolling the page to the top.

This works fine in "Preview-in-a-new-window" mode, but does not work in classic Preview mode.



 Comments   
Comment by Niels Hardeman [ 15/Mar/18 ]

Any update on this?

Comment by Canh Nguyen [ 04/Jan/22 ]

I've checked EE 5.7.14 and dx-core 6.2.15 on travel demo site. We have Tours and Destination dropdown links are similar to the example in the description. It works fine, so I'll close the ticket.

Generated at Mon Feb 12 06:16:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.