fix: scroll parent page to top on iframe load
This commit is contained in:
1 parent
427539481f
commit
dd60ce9688
2 files changed
+15
-2
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
if ('parentIframe' in window) {
|
||||
window.iFrameResizer = {
|
||||
onReady: function () {
|
||||
window.parentIFrame.scrollTo(0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user