New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify fakeStop/skipped code paths #7431
Comments
May be it's possible to do it in compatible way: johnd0e/Leaflet@improve-DomEventSpec...johnd0e:enhance-disableClickPropagation
|
Then it's checked in Line 1415 in 436430d
Line 1441 in 436430d
Edit: Edit 2: But what I've found. See this line: Line 1415 in 436430d
It's originated from #3917 (or #3307?), and the sole purpose of it - fix flaws of implementation of other feature - preventing events already processed by canvas. After commenting out that line this test case breaks:
After #7439 that is not needed anymore - no one of our tests make that condition to be true. |
There is another place that is not clean enough: Lines 165 to 166 in 436430d
This property is for leaflet's own event, but why then it is added to originalEvent ?
I've found the reason: Lines 174 to 181 in 436430d
As you can see - listener is unable to change original data object, because it receives only copy of it!But that copy contains originalEvent object, same as in data , and that's make it possible to pass anything from listener.
Sort of hack. |
Currently
disableClickPropagation
is rather complicated.For some cases it uses
fakeStop
:Leaflet/src/dom/DomEvent.js
Lines 257 to 260 in 436430d
The purpose of this function - to solve #301. Whether it is really best solution - is out of scope of this issue, but here I want to point the fact, that it is implemented in such way, that not easy to understand. There is also related
skipped
function with unobvious behavior, called from couple of places, and so on.I suppose we should not care about legacy IE anymore, and propose to revert latter commit.
The text was updated successfully, but these errors were encountered: