File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
- import "../../core/jquery-ext" ; // for findInclusive
2
1
import "../../core/polyfills" ; // SubmitEvent.submitter for Safari < 15.4 and jsDOM
3
2
import $ from "jquery" ;
4
3
import ajax from "../ajax/ajax" ;
@@ -459,9 +458,11 @@ const inject = {
459
458
}
460
459
let $src ;
461
460
$src = $source . safeClone ( ) ;
462
- $src . findInclusive ( "img" ) . on ( "load" , ( e ) => {
463
- $ ( e . currentTarget ) . trigger ( "pat-inject-content-loaded" ) ;
464
- } ) ;
461
+ for ( const img of dom . querySelectorAllAndMe ( $src [ 0 ] , "img" ) ) {
462
+ $ ( img ) . on ( "load" , ( e ) => {
463
+ $ ( e . currentTarget ) . trigger ( "pat-inject-content-loaded" ) ;
464
+ } ) ;
465
+ }
465
466
466
467
const $injected = cfg . $injected || $src ;
467
468
// Now the injection actually happens.
@@ -527,7 +528,7 @@ const inject = {
527
528
// 2) getting the element to scroll to (if not "top")
528
529
const scroll_target = [ "top" , "target" ] . includes ( cfg . scroll )
529
530
? cfg . $target [ 0 ]
530
- : $injected . findInclusive ( cfg . scroll ) [ 0 ] ;
531
+ : dom . querySelectorAllAndMe ( $injected [ 0 ] , cfg . scroll ) ;
531
532
532
533
const scroll_container = dom . find_scroll_container (
533
534
scroll_target ,
You can’t perform that action at this time.
0 commit comments