Remove form related events from bridge page controller.
This commit is contained in:
@@ -14,16 +14,12 @@ export default class extends BridgeComponent {
|
||||
await nextFrame()
|
||||
this.startObserver()
|
||||
window.addEventListener("resize", this.windowResized)
|
||||
window.addEventListener("turbo:submit-start", this.submitStart)
|
||||
window.addEventListener("turbo:submit-end", this.submitEnd)
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
super.disconnect()
|
||||
this.stopObserver()
|
||||
window.removeEventListener("resize", this.windowResized)
|
||||
window.removeEventListener("turbo:submit-start", this.submitStart)
|
||||
window.removeEventListener("turbo:submit-end", this.submitEnd)
|
||||
}
|
||||
|
||||
receive(message) {
|
||||
@@ -76,14 +72,6 @@ export default class extends BridgeComponent {
|
||||
this.send("visibility", { title: this.title, elementVisible: visible })
|
||||
}
|
||||
|
||||
notifyBridgeOfSubmitStart() {
|
||||
this.send("submitStart")
|
||||
}
|
||||
|
||||
notifyBridgeOfSubmitEnd() {
|
||||
this.send("submitEnd")
|
||||
}
|
||||
|
||||
// Intersection Observer
|
||||
|
||||
startObserver() {
|
||||
@@ -113,14 +101,6 @@ export default class extends BridgeComponent {
|
||||
this.updateObserverIfNeeded()
|
||||
}
|
||||
|
||||
submitStart = () => {
|
||||
this.notifyBridgeOfSubmitStart()
|
||||
}
|
||||
|
||||
submitEnd = () => {
|
||||
this.notifyBridgeOfSubmitEnd()
|
||||
}
|
||||
|
||||
get title() {
|
||||
return this.titleValue ? this.titleValue : document.title
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user