Skip to content

Commit b9b337c

Browse files
authored
Fix missing video input after opening formula (#48)
1 parent 4069836 commit b9b337c

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

mathquill4quill.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ window.mathquill4quill = function(dependencies) {
176176
mqInput = document.createElement("span");
177177
applyMathquillInputStyles(mqInput);
178178

179-
latexInputStyle = latexInput.style.all;
179+
latexInputStyle = latexInput.className;
180180
applyLatexInputStyles(latexInput);
181181

182182
mqField = syncMathquillToQuill(latexInput, saveButton);
@@ -192,7 +192,7 @@ window.mathquill4quill = function(dependencies) {
192192

193193
const latexInput = getLatexInput();
194194

195-
latexInput.setAttribute("style", latexInputStyle);
195+
latexInput.setAttribute("class", latexInputStyle);
196196

197197
mqInput.remove();
198198
mqInput = null;

tests/video.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* eslint-env node */
2+
3+
module.exports = {
4+
"Is the video input visible after opening the formula": function(browser) {
5+
browser
6+
.useXpath()
7+
.url("http://localhost:8000")
8+
.waitForElementVisible('//*[@id="editor"]')
9+
.click('//button[@class="ql-formula"]')
10+
.waitForElementVisible('//div[@data-mode="formula"]')
11+
.click('//button[@class="ql-video"]')
12+
.waitForElementVisible('//div[@data-mode="video"]')
13+
.assert.visible('//div[@data-mode="video"]/input');
14+
}
15+
};

0 commit comments

Comments
 (0)