@tsteur opened this Issue on September 2nd 2020 Member

image

Happens when you click on "add and condition"

image

seems to fail here:
image

Creating this here since the segment widget is in core. The feature still seems to work without any issues so far so if it's not an easy fix we might just ignore it.

refs https://github.com/matomo-org/matomo/issues/16368

@sgiehl commented on September 29th 2020 Member

That was a real though one to debug. It is indeed triggered by the closest method. But while bubbling up the elements somewhere in the deep of materialize' javascript it tries to access the matches method of an element. But in that special case the element seems to be the form element, which contains the segment editor. The segment editor itself contains an element with the name matches, which thus is part of the form. That causes el.matches not to contain the actual method it should be, but to hold the matches form element instead. That causes the error as it tries to use the form element as callback later...
A possible fix would be to rename the form field or to remove it's name completely.

@tsteur commented on September 29th 2020 Member

Great find @sgiehl Sounds good to rename the form field 👍

This Issue was closed on September 30th 2020
Powered by GitHub Issue Mirror