Smile-SA / magento2-module-store-locator

Magento 2 store locator module
50 stars 57 forks source link

Retailer new/edit form, section "Opening Hours" and "Special Opening Hours" time slider doesn't work #136

Open pusachev opened 2 years ago

pusachev commented 2 years ago

When editing or creating new retailer on sections "Opening Hours" and "Special Opening Hours" time slider doesn't work

Preconditions

PHP 8.1 Magento Version : EE 2.4.4 Module Store Locator Version : 2.0.7

Environment : development

Steps to reproduce

  1. Login to admin
  2. Go to Sellers -> Retailers
  3. Create new or edit exist retailer
  4. go to the section "Opening Hours"
  5. Try to add or change opening hours by slider

Expected result

  1. time on time slider changed slider works and show changed time

Actual result

  1. slider does not add a time slot, existing time can be edited by the slider. Unable to move slider bar

UPD:

We have a workaround for this

view/adminhtml/web/js/elessar/elessar.js:64

var has = Object.prototype.hasOwnProperty;

     module.exports = function getEventProperty(prop, event) {
+        if (typeof event.originalEvent.clientX !== undefined) {
+            return event.originalEvent.clientX;
+        }
+
         return has.call(event, prop) ? event[prop]
             : event.originalEvent && event.originalEvent.touches ? event.originalEvent.touches[0][prop]
             : undefined;

Regards,

fnogatz commented 1 year ago

This should be already fixed via #142 and #143.