mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 18:06:15 -04:00
always true/false variables
This commit is contained in:
parent
85153b1676
commit
434989de08
2 changed files with 2 additions and 2 deletions
|
@ -212,7 +212,7 @@ AttributeManager.prototype = _(AttributeManager.prototype).extend({
|
||||||
let hasAttrib = true;
|
let hasAttrib = true;
|
||||||
|
|
||||||
// from selStart to the end of the first line
|
// from selStart to the end of the first line
|
||||||
hasAttrib = hasAttrib && rangeHasAttrib(
|
hasAttrib = rangeHasAttrib(
|
||||||
selStart, [selStart[0], rep.lines.atIndex(selStart[0]).text.length]);
|
selStart, [selStart[0], rep.lines.atIndex(selStart[0]).text.length]);
|
||||||
|
|
||||||
// for all lines in between
|
// for all lines in between
|
||||||
|
|
|
@ -21,7 +21,7 @@ exports.getPosition = () => {
|
||||||
|
|
||||||
// when there's a <br> or any element that has no height, we can't get
|
// when there's a <br> or any element that has no height, we can't get
|
||||||
// the dimension of the element where the caret is
|
// the dimension of the element where the caret is
|
||||||
if (!rect || rect.height === 0) {
|
if (rect.height === 0) {
|
||||||
const clonedRange = createSelectionRange(range);
|
const clonedRange = createSelectionRange(range);
|
||||||
|
|
||||||
// as we can't get the element height, we create a text node to get the dimensions
|
// as we can't get the element height, we create a text node to get the dimensions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue