Skip to content
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

bail out of event blocking for Adobe CEP bug (fix #10366) #10459

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

ericdrobinson
Copy link

fix #10366

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
Some Adobe CEP environments have a broken Event.timeStamp implementation that breaks event blocking logic. The issue specifically affects host applications running on macOS with CEP version 9.3 and below. This workaround is OS-agnostic so as to maintain identical behavior across platforms. More details can be found in issue #10366.

@ericdrobinson ericdrobinson changed the title bail out of event blocking for Adobe CEP bug (fix #10366) fix: bail out of event blocking for Adobe CEP bug Aug 30, 2019
@ericdrobinson ericdrobinson changed the title fix: bail out of event blocking for Adobe CEP bug bail out of event blocking for Adobe CEP bug (fix #10366) Aug 30, 2019
@derrickb
Copy link

derrickb commented Sep 6, 2019

One note:
var isCEP = inBrowser && window.__adobe_cep__ !== 'undefined';
I believe you're missing typeof, or change 'undefined' to undefined.

src/core/util/env.js Outdated Show resolved Hide resolved
Some Adobe CEP environments have a broken Event.timeStamp implementation that breaks event blocking
logic. The issue specifically affects host applications running on macOS with CEP version 9.3 and
below. This workaround is OS-agnostic so as to maintain identical behavior across platforms. More
details can be found in issue vuejs#10366.

fix vuejs#10366
@ericdrobinson ericdrobinson force-pushed the fix-adobe-cep-mouse-events branch from 58eb122 to 1911503 Compare September 6, 2019 20:23
@ericdrobinson
Copy link
Author

@derrickb Fixed! Thanks for catching that!! 😅

src/core/util/env.js Outdated Show resolved Hide resolved
Improve type checking of the `__adobe_cep__` object. It shouldn't just be `undefined` but explicitly
an object.
It is possible that extremely early versions of Adobe CEP did not have the `getCurrentApiVersion`
function defined. In such cases, assume "CEP 9.3 or earlier".
@ericdrobinson
Copy link
Author

@posva Fixes applied. Please let me know if there is anything further!

@ericdrobinson
Copy link
Author

ericdrobinson commented Sep 16, 2019

For the record, the decision to assume that:

__adobe_cep__.getCurrentApiVersion === undefined => super old CEP version

was correct.

I just ran across this statement in the official CEP Cookbook:

Please note [that the getCurrentApiVersion] API itself is available only since 4.2.0. If you get an error saying getCurrentApiVersion is undefined, then you are running in CEP 4.0 or 4.1. Otherwise, the value returned will tell you the version of CEP integrated by the Adobe product.

Awesome. 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Click Event Triggers on Complex Buttons are ignored in some environments
4 participants