Merge pull request #472 from EvilOatmeal/fix-empty-collapsing-regression
Remove a redundant bug fix for webkit.
diff --git a/src/css/math.less b/src/css/math.less
index 9669d4b..954d27c 100644
--- a/src/css/math.less
+++ b/src/css/math.less
@@ -6,11 +6,6 @@
white-space: nowrap;
overflow: hidden;
vertical-align: middle;
- // &:after is a fix for
- // https://bugs.webkit.org/show_bug.cgi?id=35443#c1
- &:after {
- content: '';
- }
}
.mq-math-mode {
font-variant: normal;
diff --git a/test/unit/css.test.js b/test/unit/css.test.js
index ab458ac..d1243ec 100644
--- a/test/unit/css.test.js
+++ b/test/unit/css.test.js
@@ -16,7 +16,29 @@
$(mock).css({
fontSize: '',
height: '',
- widht: ''
+ width: ''
});
});
+
+ test('empty root block does not collapse', function() {
+ var testEl = $('<span></span>').appendTo('#mock');
+ var mq = MathQuill.MathField(testEl[0]);
+ var rootEl = testEl.find('.mq-root-block');
+
+ assert.ok(rootEl.hasClass('mq-empty'), 'Empty root block should have the mq-empty class name.');
+ assert.ok(rootEl.height() > 0, 'Empty root block height should be above 0.');
+
+ testEl.remove();
+ });
+
+ test('empty block does not collapse', function() {
+ var testEl = $('<span>\\frac{}{}</span>').appendTo('#mock');
+ var mq = MathQuill.MathField(testEl[0]);
+ var numeratorEl = testEl.find('.mq-numerator');
+
+ assert.ok(numeratorEl.hasClass('mq-empty'), 'Empty numerator should have the mq-empty class name.');
+ assert.ok(numeratorEl.height() > 0, 'Empty numerator height should be above 0.');
+
+ testEl.remove();
+ });
});