Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/components/MessageHTMLBody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,19 @@ export default {
if (this.isSenderTrusted) {
this.displayIframe()
}

// Events occurring into the iframe are forced to bubble to the
// document, to be intercepted by other functions
const propagateEvents = ['click', 'keydown', 'keyup']
propagateEvents.forEach((eventType) => {
iframeDoc.addEventListener(eventType, (e) => {
const cloned = new e.constructor(e.type, e)
this.$refs.iframe.dispatchEvent(cloned)
if (cloned.defaultPrevented) {
e.preventDefault()
}
})
})
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},

onBeforePrint() {
Expand Down
Loading