Changes between Version 1 and Version 2 of Ticket #49025, comment 2
- Timestamp:
- 04/22/2020 05:01:26 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #49025, comment 2
v1 v2 15 15 targetHref = target.href; 16 16 17 this.untoggleModal(target.closest('.cover-modal.active'));18 19 17 if ('' !== target.hash && -1 !== targetHref.indexOf(url)) { 20 setTimeout(function () { 21 document.getElementById(target.hash.substr(1)).scrollIntoView() 22 }, 700); 18 this.untoggleModal(target.closest('.cover-modal.active')); 19 setTimeout(() => document.getElementById(target.hash.slice(1)).scrollIntoView(), 700); 23 20 } 24 21 } … … 31 28 32 29 I also prefer `#scrollIntoView` instead of creating a fake element using `#createElement`. 30 31 **Edit2** 32 Now only untoggles the modal menu if this is a valid anchor, otherwise simply follows the link.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)