Re: [pointerevents] Click event while a pointer event is captured

Hi @freshp86 .
I myself am a big fan of sending the click event to the captured node. I tried implementing it in chrome back then but we hit a few regressions and we couldn't ship it yet. We are still trying to ship that as that is a more predictable and consistent behavior IMO. But it might take a little longer.

However, I don't quite agree with your definition of hack.
Mainly because the logic you have in the click handler of the toggle button itself (i.e. dom-module) is different from the click handler of the clickable-row. Don't you think that is unfair to expect them do the same thing?
You already have a hack in the click handler of the dom-module to ignore the click that is sent to itself. 

`
    // User gesture has already been taken care of inside |pointermove|
    // handlers, Do nothing here.
    if (this.handledInPointerMove_)
      return;
`
That logic kicks in when I move the pointer around and then release the pointer inside that module. But then you don't have that logic in the outer click handler and when you add it to that you call it a hack? If I were you I would have a function in my dom-module to handle the click (which you do and already has that handledInPointerMove check). Then I would just call that from the click handler of my clickable-row rather than trying to modify the checked attribute directly.


-- 
GitHub Notification of comment by NavidZ
Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/75#issuecomment-349527440 using your GitHub account

Received on Wednesday, 6 December 2017 04:13:01 UTC