question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Click Event Triggers on Complex Buttons are ignored in some environments

See original GitHub issue

Version

2.6.10

Reproduction link

https://jsfiddle.net/s7hyqk13/2/

Steps to reproduce

  1. Configure one of the Adobe CEP Sample Panels. The PProPanel is a good starting point as it has very clear documentation on how to set up the environment for testing.
  2. Replace the HTML/JavaScript/CSS contents of the panel project with the contents of the linked JSFiddle.
  3. Open the panel.
  4. Attach a debugger (with the default PProPanel setup this would mean browsing to localhost:7777 in Chrome).
  5. Set the “Mouse > clickEvent Listener Breakpoint in the “Sources” tab of the Chrome Debugger.
  6. Click the Vue icon in the center of the silver div.

What is expected?

Method bound to the @click handler is triggered when the image embedded in the parent div is clicked.

What is actually happening?

The method bound to the @click handler is only triggered when clicking outside of the parent div.


This is a non-trivial bug to reproduce as the only place I’ve experienced it is in Adobe CEP extensions (which run NW.js under the hood). That said, it does reproduce 100% of the time there.

The debugger (CEP context) seems to show several funny things at around this line in the Vue events.js file. Specifically:

  1. The e.timeStamp value does not change between callbacks for different buttons/elements.
  2. The attachedTimestamp is significantly larger than the e.timeStamp value.
  3. The attachedTimestamp value does change when the component is updated (the e.timeStamp remains identical).

I should note that this affects at least CEP 8.0 and CEP 9.0 (tested in Premiere Pro).

Vue Versions Note: This broke somewhere between versions 2.5.17 and 2.6.x. If we run a version of 2.5 (2.5.17 and some earlier versions verified), then this issue does not occur. In testing 2.6.x, we’ve found that this same issue occurs from 2.6.5 to 2.6.10 (latest). Versions of 2.6 prior to 2.6.5 are actually worse in that the buttons basically don’t work at all.

Important Note: I should further note that apparently right-clicking to open the basic CEF [not CEP] context menu will cause the e.timeStamp values to begin reporting as expected. Once this occurs, the buttons will also work as expected. That said, we shouldn’t have to instruct users to right-click prior to interfacing with the extension.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:31 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
derrickbcommented, Sep 6, 2019

I can confirm that @ericdrobinson’s PR fixes the issue for me on Photoshop CC 2019 macOS

2reactions
posvacommented, Aug 29, 2019

@posva Sounds good to me. Do you have any input on whether or not I should add the macOS platform check to restrict the fix to macOS?

Ideally, the program should behave the same on CEP osx vs CEP windows

Other than that the checks you wrote look good

Read more comments on GitHub >

github_iconTop Results From Across the Web

jQuery click events firing multiple times - Stack Overflow
To make sure the event always only fires once, you can use Jquery .one() . JQuery one ensures that your event handler only...
Read more >
Handling Events :: Eloquent JavaScript
Though we have ignored it so far, event handler functions are passed an argument: the event object. This object holds additional information about...
Read more >
OnPointerClick not firing, what am i missing? - Unity Forum
I have the physics ray caster, i am trying to click the floor in my environment but it's not triggering the method.
Read more >
Click trigger - Tag Manager Help - Google Support
Use Google Tag Manager's click trigger to fire tags based on click events. ... Track clicks on any element on a page, e.g....
Read more >
UI Events - W3C
User-initiated activation triggers include clicking a mouse button on an activatable element, pressing the Enter key when an activatable element ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found