Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix linter errors
  • Loading branch information
dbseel committed Aug 19, 2022
commit 0f1c6000a535a6143a19e6157241f2b5ab9f7dbb
10 changes: 5 additions & 5 deletions packages/rrweb/src/record/observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ function initStyleDeclarationObserver(
) {
// ignore this mutation if we do not care about this css attribute
if (ignoreCSSAttributes.has(property)) {
return setProperty.apply(this, arguments);
return setProperty.apply(this, [property, value, priority]);
}
const id = mirror.getId(this.parentRule?.parentStyleSheet?.ownerNode);
if (id !== -1) {
Expand All @@ -654,7 +654,7 @@ function initStyleDeclarationObserver(
) {
// ignore this mutation if we do not care about this css attribute
if (ignoreCSSAttributes.has(property)) {
return setProperty.apply(this, arguments);
return removeProperty.apply(this, [property]);
}
const id = mirror.getId(this.parentRule?.parentStyleSheet?.ownerNode);
if (id !== -1) {
Expand Down Expand Up @@ -767,7 +767,7 @@ function initFontObserver({ fontCb, doc }: observerParam): listenerHandler {
}

function initSelectionObserver(param: observerParam): listenerHandler {
const { doc, mirror, blockClass, selectionCb } = param;
const { doc, mirror, blockClass, blockSelector, selectionCb } = param;
let collapsed = true;

const updateSelection = () => {
Expand All @@ -786,8 +786,8 @@ function initSelectionObserver(param: observerParam): listenerHandler {
const { startContainer, startOffset, endContainer, endOffset } = range;

const blocked =
isBlocked(startContainer, blockClass, true) ||
isBlocked(endContainer, blockClass, true);
isBlocked(startContainer, blockClass, blockSelector, true) ||
isBlocked(endContainer, blockClass, blockSelector, true);

if (blocked) continue;

Expand Down