Click Event Triggers on Complex Buttons are ignored in some environments
See original GitHub issueVersion
2.6.10
Reproduction link
https://jsfiddle.net/s7hyqk13/2/
Steps to reproduce
- 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.
- Replace the HTML/JavaScript/CSS contents of the panel project with the contents of the linked JSFiddle.
- Open the panel.
- Attach a debugger (with the default PProPanel setup this would mean browsing to
localhost:7777
in Chrome). - Set the “Mouse >
click
” Event Listener Breakpoint in the “Sources” tab of the Chrome Debugger. - 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:
- The
e.timeStamp
value does not change between callbacks for different buttons/elements. - The
attachedTimestamp
is significantly larger than thee.timeStamp
value. - The
attachedTimestamp
value does change when the component is updated (thee.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:
- Created 4 years ago
- Reactions:4
- Comments:31 (4 by maintainers)
Top GitHub Comments
I can confirm that @ericdrobinson’s PR fixes the issue for me on Photoshop CC 2019 macOS
Ideally, the program should behave the same on CEP osx vs CEP windows
Other than that the checks you wrote look good