Skip to content

Commit

Permalink
fix event propagation order
Browse files Browse the repository at this point in the history
  • Loading branch information
olifolkerd committed Jan 19, 2025
1 parent 48ee66a commit cd66586
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 8 deletions.
11 changes: 9 additions & 2 deletions dist/js/tabulator_esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -27201,8 +27201,9 @@ class InteractionManager extends CoreFeature {
var keys = Object.keys(targets).reverse(),
listener = this.listeners[type],
matches = {},
output = {},
targetMatches = {};

for(let key of keys){
let component,
target = targets[key],
Expand Down Expand Up @@ -27257,8 +27258,14 @@ class InteractionManager extends CoreFeature {
}

this.previousTargets = targetMatches;

//reverse order keys are set in so events trigger in correct sequence
Object.keys(targets).forEach((key) => {
let value = matches[key];
output[key] = value;
});

return matches;
return output;
}

triggerEvents(type, e, targets){
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tabulator_esm.js.map

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions dist/js/tabulator_esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27201,8 +27201,9 @@ class InteractionManager extends CoreFeature {
var keys = Object.keys(targets).reverse(),
listener = this.listeners[type],
matches = {},
output = {},
targetMatches = {};

for(let key of keys){
let component,
target = targets[key],
Expand Down Expand Up @@ -27257,8 +27258,14 @@ class InteractionManager extends CoreFeature {
}

this.previousTargets = targetMatches;

//reverse order keys are set in so events trigger in correct sequence
Object.keys(targets).forEach((key) => {
let value = matches[key];
output[key] = value;
});

return matches;
return output;
}

triggerEvents(type, e, targets){
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tabulator_esm.mjs.map

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions src/js/core/tools/InteractionMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ export default class InteractionManager extends CoreFeature {
var keys = Object.keys(targets).reverse(),
listener = this.listeners[type],
matches = {},
output = {},
targetMatches = {};

for(let key of keys){
let component,
target = targets[key],
Expand Down Expand Up @@ -295,8 +296,14 @@ export default class InteractionManager extends CoreFeature {
}

this.previousTargets = targetMatches;

//reverse order keys are set in so events trigger in correct sequence
Object.keys(targets).forEach((key) => {
let value = matches[key];
output[key] = value;
});

return matches;
return output;
}

triggerEvents(type, e, targets){
Expand Down

0 comments on commit cd66586

Please sign in to comment.