From 7b1b2437084d65618e88908c955f8987db351a6f Mon Sep 17 00:00:00 2001 From: f Date: Tue, 17 Nov 2020 20:30:06 -0300 Subject: [PATCH] deshabilitar los controles de los videos para poder seleccionarlos --- app/assets/javascripts/02-editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/02-editor.js b/app/assets/javascripts/02-editor.js index dfbb3f7a..2d6b9f66 100644 --- a/app/assets/javascripts/02-editor.js +++ b/app/assets/javascripts/02-editor.js @@ -465,6 +465,7 @@ function setupEditor (editorEl) { for (const video of document.querySelectorAll('.editor .editor-content video')) { video.addEventListener('click', event => event.target.controls = true) video.addEventListener('focusout', event => event.target.controls = false) + video.controls = false } cleanContent(contentEl) @@ -479,7 +480,7 @@ function stringifyAllowedStyle (element) { document.addEventListener("turbolinks:load", () => { for (const editorEl of document.querySelectorAll(".editor")) { - if (!editorEl.querySelector('.editor-toolbar')) continue + if (!editorEl.querySelector('.editor-toolbar')) continue setupEditor(editorEl) }