Changeset 47420
- Timestamp:
- 03/03/2020 05:49:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/privacy-tools.js
r47395 r47420 275 275 if ( $container.length ) { 276 276 try { 277 var documentPosition = document.documentElement.scrollTop, 278 bodyPosition = document.body.scrollTop; 279 277 280 window.getSelection().removeAllRanges(); 278 281 range = document.createRange(); … … 285 288 $container.removeClass( 'hide-privacy-policy-tutorial' ); 286 289 window.getSelection().removeAllRanges(); 290 291 if ( documentPosition > 0 && documentPosition !== document.documentElement.scrollTop ) { 292 document.documentElement.scrollTop = documentPosition; 293 } else if ( bodyPosition > 0 && bodyPosition !== document.body.scrollTop ) { 294 document.body.scrollTop = bodyPosition; 295 } 287 296 } catch ( er ) {} 288 297 }
Note: See TracChangeset
for help on using the changeset viewer.