diff --git a/devtools/client/responsive/components/DeviceForm.js b/devtools/client/responsive/components/DeviceForm.js index 22866fd2a8a3..f15871f737b2 100644 --- a/devtools/client/responsive/components/DeviceForm.js +++ b/devtools/client/responsive/components/DeviceForm.js @@ -62,7 +62,9 @@ class DeviceForm extends PureComponent { }); } - onDeviceFormSave() { + onDeviceFormSave(e) { + e.preventDefault(); + if (!this.pixelRatioInputRef.current.checkValidity()) { return; }