rails_modal_manager 1.0.46 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68dff9c13d32d307a383334b179255c5903ec1e1f5813b557a383d53f3744d24
|
|
4
|
+
data.tar.gz: '09e3d7b82256ffa9092d47b4b8090d7775f3b9d60d14b254085092e0e5115948'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 459cc7ac9e84bc774326f31f3bcc429833aeb1b2be7017b91a8b2114af02130f441af2b2fcc00730c8204978914bc67ce7ca3f3f5ede295f3e2c9527328c07ac
|
|
7
|
+
data.tar.gz: 617d3d710eab2b71e91dac4d1fd8a3136f5c7a1c0ecb7e6e36b921afe5e7e4750794775effb1d220b4ed23092f312fc1397198ac6b1cc084adfc796ee6ceb381
|
|
@@ -412,6 +412,9 @@ export default class extends Controller {
|
|
|
412
412
|
const modal = this.element
|
|
413
413
|
const overlay = this.getOverlay()
|
|
414
414
|
|
|
415
|
+
// 모달 내부 미디어(video, audio) 정지
|
|
416
|
+
this.stopMedia()
|
|
417
|
+
|
|
415
418
|
// Reset sidebar and submenu to first item before hiding
|
|
416
419
|
this.resetSidebarAndSubmenu()
|
|
417
420
|
|
|
@@ -497,6 +500,18 @@ export default class extends Controller {
|
|
|
497
500
|
})
|
|
498
501
|
}
|
|
499
502
|
|
|
503
|
+
/**
|
|
504
|
+
* Stop all media (video, audio) playing inside the modal
|
|
505
|
+
*/
|
|
506
|
+
stopMedia() {
|
|
507
|
+
const mediaElements = this.element.querySelectorAll('video, audio')
|
|
508
|
+
mediaElements.forEach(media => {
|
|
509
|
+
if (!media.paused) {
|
|
510
|
+
media.pause()
|
|
511
|
+
}
|
|
512
|
+
})
|
|
513
|
+
}
|
|
514
|
+
|
|
500
515
|
// ============================================
|
|
501
516
|
// Styles
|
|
502
517
|
// ============================================
|