Closed boldhedgehog closed 1 year ago
Issue:
Pressing Enter on any input field in the shipping method checkout form "co-shipping-method-form" displays the DHL service point locator popup.
This is caused by the missing type of the #dhlparcel-shipping-servicepoint-button button. Due to the missing button type the button behaves as the form submit button. And pressing Enter in any input field in the form triggers the "click" event added here: https://github.com/dhlparcel/plugin-magento2-release/blob/master/view/frontend/web/js/view/servicepoint-loader.js#L150
#dhlparcel-shipping-servicepoint-button
The button is defined here: https://github.com/dhlparcel/plugin-magento2-release/blob/master/view/frontend/web/template/servicepoint-info.html#L8
Adding the attribute type="button" solves the issue.
type="button"
<button id="dhlparcel-shipping-servicepoint-button" type="button" data-bind="text: DHLParcel_Shipping_HasServicePoint() ? $t('Choose a different DHL ServicePoint') : $t('Please choose a DHL ServicePoint')"> </button>
Thanks for your detailed issue. We will resolve this in our next release (which is planned this Monday).
Issue:
Pressing Enter on any input field in the shipping method checkout form "co-shipping-method-form" displays the DHL service point locator popup.
This is caused by the missing type of the
#dhlparcel-shipping-servicepoint-button
button. Due to the missing button type the button behaves as the form submit button. And pressing Enter in any input field in the form triggers the "click" event added here: https://github.com/dhlparcel/plugin-magento2-release/blob/master/view/frontend/web/js/view/servicepoint-loader.js#L150The button is defined here: https://github.com/dhlparcel/plugin-magento2-release/blob/master/view/frontend/web/template/servicepoint-info.html#L8
Adding the attribute
type="button"
solves the issue.