CEP-Resources icon indicating copy to clipboard operation
CEP-Resources copied to clipboard

`touchend` and `pointerup` events doesn't work

Open oleksandrbezditny opened this issue 2 years ago • 10 comments

I am trying to write an extension for After effect and faced up with one strange behavior - the browser inside the extension doesn't trigger touchend or pointerup events when I click on a button (the click event itself works perfectly). The reason why I need these events it's because I am trying to use Adobe Spectrum as a UI kit for my application. Under a hood, it uses these events to handle clicks on a button (some explanation is here). Unfortunately, I cannot use click events as it is marked as deprecated in the library (and is not available in d.ts files). I've prepared the small test project where I added 3 events - pointerup, touchend and click. As a result, only one click event is triggered. Also, another strange behavior - the extension works as expected in debug mode (when it's opened in the Chrome browser). I would like to hear any comments and suggestions about this issue. Thank you.

oleksandrbezditny avatar Sep 21 '21 13:09 oleksandrbezditny

@oleksandrbezditny There is a similar issue: https://github.com/adobe/react-spectrum/issues/854 Let us know if this issue happens only with mac? if not, then this could be some other issue.

rushilmahajan-adobe avatar Oct 26 '21 04:10 rushilmahajan-adobe

I have the same issue as well.

We have an html panel extension where scrolling and css hover styles don't apply (For example, resize cursor not shown when hovering on a resizable panel).

On CEP 10 things works well. On CEP 11 Things work well only on Windows machines. MacOS suffers from the issues above and the extension became basically unusable.

Checked out https://github.com/adobe/react-spectrum/issues/854 (Although we don't use react-spectrum) and tried to use the workaround of deleting window.PointerEvent. This helped a bit but not enough - scrolling came back sluggishly - working on/off w/o noticeable reason, hover effects didn't.

https://github.com/LFDanLu Mentioned opening an internal bug for this - Is there any progress? Any other ideas?

Thanks a lot

mamlukishay avatar Nov 02 '21 12:11 mamlukishay

I have the same issue as well.

We have an html panel extension where scrolling and css hover styles don't apply (For example, resize cursor not shown when hovering on a resizable panel).

On CEP 10 things works well. On CEP 11 Things work well only on Windows machines. MacOS suffers from the issues above and the extension became basically unusable.

Checked out adobe/react-spectrum#854 (Although we don't use react-spectrum) and tried to use the workaround of deleting window.PointerEvent. This helped a bit but not enough - scrolling came back sluggishly - working on/off w/o noticeable reason, hover effects didn't.

https://github.com/LFDanLu Mentioned opening an internal bug for this - Is there any progress? Any other ideas?

Thanks a lot

Can I get a sample from you which has the issue?

sujaisivanandan avatar Nov 02 '21 14:11 sujaisivanandan

I have the same issue as well. We have an html panel extension where scrolling and css hover styles don't apply (For example, resize cursor not shown when hovering on a resizable panel). On CEP 10 things works well. On CEP 11 Things work well only on Windows machines. MacOS suffers from the issues above and the extension became basically unusable. Checked out adobe/react-spectrum#854 (Although we don't use react-spectrum) and tried to use the workaround of deleting window.PointerEvent. This helped a bit but not enough - scrolling came back sluggishly - working on/off w/o noticeable reason, hover effects didn't. @LFDanLu Mentioned opening an internal bug for this - Is there any progress? Any other ideas? Thanks a lot

Can I get a sample from you which has the issue?

What do you mean by "a sample"? I tried to create a simple repo to reproduce this, but didn't succeed. Problem is that this seems like a result of a lib we're using that somehow collides with CEP (Same as the react-spectrum case), but I couldn't find the dependency that causes it (It's a complex problem with lots of dependencies). I'm almost sure that solving the issue with react-spectrum will solve it to me as well cause the problem sounds all too familiar.

Thanks

mamlukishay avatar Nov 04 '21 12:11 mamlukishay

@oleksandrbezditny There is a similar issue: adobe/react-spectrum#854 Let us know if this issue happens only with mac? if not, then this could be some other issue.

@rushilmahajan-adobe Apologize for the long delay from my side. Let us know if this issue happens only with mac? - yes, it happens only on Mac OS. I've tested on both Windows and Mac OS. And yes, you are right, the issue that is described here is the same as mine. From what I understand, inside the library there is a check, if the window.PointerEvent exists then they'll use pointer events. But. these events don't work inside Adobe CEP env. So, As a temporary solution, I removed window.PointerEvent by adding window.PointerEvent = undefined; in my code.

oleksandrbezditny avatar Dec 01 '21 14:12 oleksandrbezditny

Update -

Took me some time to find this, but apparently my issue is related to this known issue: https://github.com/Adobe-CEP/CEP-Resources/blob/master/CEP_11.x/Documentation/Issues.md#issue-2-cep-11-ui-issues-with-cross-site-iframes

Setting the --disable-site-isolation-trials flag fixed my problem, which is fine as a workaround. Hopefully this will be fix by the CEP team shortly.

mamlukishay avatar Dec 05 '21 07:12 mamlukishay

Hello, any updates on this?

justadaniel avatar Dec 29 '22 19:12 justadaniel

Hello, Any updates on fixing this issue?

lmoragmg avatar Aug 30 '23 16:08 lmoragmg

Hello, reproducing this bug: on Mac OS in Adobe Premiere Pro 24.1, with React Spectrum, Button and Link elements's onPress= handlers do never trigerred when I try to click them, while regular React elements' onClick events do get triggered. I also confirm that the fix is @mamlukishay 's one in above comment https://github.com/Adobe-CEP/CEP-Resources/issues/401#issuecomment-986178288 Thank God there is that fix for this strange behaviour. Since I was using HyperBrew's Bolt CEP SDK for making CEP panels, the "--disable-site-isolation-trials" flag (which ends up in the manifest.xml's <CEFCommandLine><Parameter> tags) must be allowed among the cep.config.ts 'parameters' key string values. Will make a related issue on the Bolt CEP project side for that.

myselfhimself avatar Mar 22 '24 18:03 myselfhimself

The other fix, which consists in adding a one-liner

myselfhimself avatar Mar 22 '24 19:03 myselfhimself