@mmstack/primitives 22.6.0 → 22.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3634,7 +3634,7 @@ function createPointerDrag(opt) {
|
|
|
3634
3634
|
return;
|
|
3635
3635
|
const matched = handleSelector
|
|
3636
3636
|
? e.target?.closest?.(handleSelector)
|
|
3637
|
-
: el;
|
|
3637
|
+
: (e.target ?? el); // no selector: the pressed element itself
|
|
3638
3638
|
if (!matched)
|
|
3639
3639
|
return; // handleSelector set but pointerdown landed outside a handle
|
|
3640
3640
|
if (stopPropagation)
|
|
@@ -6098,6 +6098,7 @@ function tabSync(sig, opt) {
|
|
|
6098
6098
|
}
|
|
6099
6099
|
const NONE = Symbol();
|
|
6100
6100
|
let received = NONE;
|
|
6101
|
+
let last = untracked(sig);
|
|
6101
6102
|
const { unsub, post } = bus.subscribe(id, (next) => {
|
|
6102
6103
|
const before = untracked(sig);
|
|
6103
6104
|
received = next;
|
|
@@ -6105,13 +6106,12 @@ function tabSync(sig, opt) {
|
|
|
6105
6106
|
if (untracked(sig) === before)
|
|
6106
6107
|
received = NONE;
|
|
6107
6108
|
});
|
|
6108
|
-
let firstDone = false;
|
|
6109
6109
|
const effectRef = effect(() => {
|
|
6110
6110
|
const val = sig();
|
|
6111
|
-
if (
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6111
|
+
if (val === last)
|
|
6112
|
+
return; // unchanged since last seen → nothing to post
|
|
6113
|
+
last = val;
|
|
6114
|
+
// came from bus → don't echo
|
|
6115
6115
|
if (val === received) {
|
|
6116
6116
|
received = NONE;
|
|
6117
6117
|
return;
|