Skip to content

PDF Viewer on mozilla #4261

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

Open
2 tasks done
costinarsene opened this issue Apr 16, 2025 · 3 comments
Open
2 tasks done

PDF Viewer on mozilla #4261

costinarsene opened this issue Apr 16, 2025 · 3 comments

Comments

@costinarsene
Copy link

costinarsene commented Apr 16, 2025

What is the issue and how can we reproduce it?

Inside PDFViewer.prototype._onLoadListener

on .then((sCurrentContentType) => {..}

missing .bind(this) . The same apllies for the next catch in current promise

It is replicated for 1.96 -1.108

Which OpenUI5 version is your project targeting?

1.96 -1.108

Is the issue device- or browser-specific?

Replicated on Firefox latest version

Confirmation

  • I have searched the existing issues and reviewed the relevant documentation as well as the API reference.
  • I am not disclosing any internal or sensitive information.
nyckysoft added a commit to nyckysoft/openui5 that referenced this issue Apr 16, 2025
@codeworrior
Copy link
Member

codeworrior commented Apr 16, 2025

I don't get your point yet, @costinarsene. The code that you linked, uses arrow functions. Arrow functions use the same this as the code in which they are located. Or are you suggesting, that arrow functions don't work in Firefox when used for an event originating from an iframe (as @nyckysoft's PR suggests)?

Maybe you can share the actual error that you encounter. That might help us in understanding what's going wrong.

P.S.: I hope that the code in question wasn't downported to 1.96 as we don't support arrow functions in that code line

@nyckysoft
Copy link

I don't get your point yet, @costinarsene. The code that you linked, uses arrow functions. Arrow functions use the same this as the code in which they are located. Or are you suggesting, that arrow functions don't work in Firefox when used for an event originating from an iframe (as @nyckysoft's PR suggests)?

Maybe you can share the actual error that you encounter. That might help us in understanding what's going wrong.

P.S.: I hope that the code in question wasn't downported to 1.96 as we don't support arrow functions in that code line

The matter is about the precise version 1.96.38 in which there are clasic functions but that specific one is missing the .bind(this). This cause the script to run in an exception which is caught but the function (clasical function) in catch is also missing the .bind(this)

@costinarsene
Copy link
Author

@codeworrior I made a mistake. The issue is replicated on 1.96 until 1.108. Over there you did not use arrow function. I modified the initial issue.

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

No branches or pull requests

3 participants