Merge pull request #188 from EmptyDust/fix/herosms-max-price-input

fix: 修复接码价格上限输入被自动回刷
This commit is contained in:
QLHazyCoder
2026-05-03 03:20:22 +08:00
committed by GitHub
2 changed files with 11 additions and 1 deletions
-1
View File
@@ -10834,7 +10834,6 @@ selectHeroSmsPreferredActivation?.addEventListener('change', () => {
});
inputHeroSmsMaxPrice?.addEventListener('input', () => {
markSettingsDirty(true);
scheduleSettingsAutoSave();
});
inputHeroSmsMaxPrice?.addEventListener('blur', () => {
inputHeroSmsMaxPrice.value = normalizeHeroSmsMaxPriceValue(inputHeroSmsMaxPrice.value);
@@ -486,3 +486,14 @@ return { collectSettingsPayload };
assert.equal(payload.heroSmsCountryLabel, 'Thailand');
assert.deepStrictEqual(payload.heroSmsCountryFallback, [{ id: 16, label: 'United Kingdom' }]);
});
test('hero sms max price input does not auto-save partial typing states', () => {
assert.match(
sidepanelSource,
/inputHeroSmsMaxPrice\?\.\s*addEventListener\('input',\s*\(\)\s*=>\s*\{\s*markSettingsDirty\(true\);\s*\}\);/
);
assert.doesNotMatch(
sidepanelSource,
/inputHeroSmsMaxPrice\?\.\s*addEventListener\('input',\s*\(\)\s*=>\s*\{\s*markSettingsDirty\(true\);\s*scheduleSettingsAutoSave\(\);/
);
});