forge
Explore
Log in

Don't you dare go Hollow

A live refresh that lands while a mouse button is held waits for the release, so a click on a run page row is no longer lost to a swap under the pointer

Browse files at this commit

3e78c0bf662b6e12b8844ee93697f75b23a97b02Ahmet Kaan GümüşParent: 7596a78
  • fix
    • a live refresh that lands while a mouse button is held waits for the release, so a click on a run page row is no longer lost to a swap under the pointer
Show full message
🐛 fix: a live refresh that lands while a mouse button is held waits for the release, so a click on a run page row is no longer lost to a swap under the pointer
crates/forge-web/assets/nav.jsmodified+2 -0
@@ -544,6 +544,8 @@
544 }).then(function (res) {544 }).then(function (res) {
545 o.result = res;545 o.result = res;
546 if (mark !== latest) { return; }546 if (mark !== latest) { return; }
547+ // A swap under a held button would take the press's element away, and the click with it.
548+ if (o.how === 'live' && pressing) { liveDirty = true; return; }
547 if (res.down) { if (o.how !== 'live') { outage(o); } return; }549 if (res.down) { if (o.how !== 'live') { outage(o); } return; }
548 if (res.leave) { leave(res, o); return; }550 if (res.leave) { leave(res, o); return; }
549 // A code view keeps its page when a live refresh fails. A 404 means its path is gone at the new ref.551 // A code view keeps its page when a live refresh fails. A 404 means its path is gone at the new ref.