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

2886: Not working Link in Aschaffenburg #2899

Closed
wants to merge 1 commit into from

Conversation

bahaaTuffaha
Copy link
Contributor

Short description

When pressing an anchor tag inside the WebView , the scroll position jumps down.

Proposed changes

  • Injecting JavaScript to webView to prevent tag from scrolling.
  • The code should listen to presses and go through nested elements to find tag and forward the href to the window.

Side effects

None.

Testing

  1. Open 'Hallo Aschaffenburg' - tile 'Hallo!'
  2. Swipe up and tap 'Aschaffenburg in Zahlen'
  3. Swipe all the way up
  4. Tap at 'Broschüre zum Familienleben' -> page opens; all fine now tap at back
  5. Again tap at 'Broschüre zum Familienleben' -> page jumps by about 250 pixel down;

Resolved issues

Fixes: #2886


Copy link

codeclimate bot commented Aug 28, 2024

Code Climate has analyzed commit e008f12 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 0.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 74.0%.

View more on Code Climate.

Copy link
Contributor

@LeandraH LeandraH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for yet another PR 🚀 I have three points about this one:

  1. To be honest, I don't quite understand the code, why do you want to disable scrolling?

  2. I tested it on an emulator (Pixel 7 API 34), and the problem still occurred.
    Screen_recording_20240830_122828.webm

It seems to not be happening when you open the "Zahlen aus Aschaffenburg" link a second time, so maybe you forgot to go back to the previous screen to reopen the page in your development? That at least sounds like something I would forget...

  1. As written in the issue ticket about this, I think it's a larger issue that doesn't really have anything to do with the remote content. Maybe we should discuss this on Monday at the Weekly to see if other people have some ideas about what's going on here, but it really sounds a lot like Found articles jump upwards and hide title #2160 to me.

@bahaaTuffaha
Copy link
Contributor Author

Thank you for yet another PR 🚀 I have three points about this one:

  1. To be honest, I don't quite understand the code, why do you want to disable scrolling?
  2. I tested it on an emulator (Pixel 7 API 34), and the problem still occurred.
    Screen_recording_20240830_122828.webm

It seems to not be happening when you open the "Zahlen aus Aschaffenburg" link a second time, so maybe you forgot to go back to the previous screen to reopen the page in your development? That at least sounds like something I would forget...

  1. As written in the issue ticket about this, I think it's a larger issue that doesn't really have anything to do with the remote content. Maybe we should discuss this on Monday at the Weekly to see if other people have some ideas about what's going on here, but it really sounds a lot like IGAPP-1225: Found articles jump upwards and hide title #2160 to me.
2024-08-30.13-45-35.mp4

Tested on Pixel 6a (API 33)
I will test it on 34..
I'm trying to stop the scrolling behavior when clicking on an anchor 😅

@LeandraH
Copy link
Contributor

Tested on Pixel 6a (API 33)
I will test it on 34..
I'm trying to stop the scrolling behavior when clicking on an anchor 😅

Aaaah, I see, the difference is that I'm not clicking on an anchor, I'm just clicking somewhere on the screen. So I guess it's half-way there? But also, I would recommend not working on this ticket more until we've discussed it on Monday. If this is really a bug in react-native-webview, we'll have to decide if we maybe want to patch the package instead.

@bahaaTuffaha
Copy link
Contributor Author

Tested on Pixel 6a (API 33)
I will test it on 34..
I'm trying to stop the scrolling behavior when clicking on an anchor 😅

Aaaah, I see, the difference is that I'm not clicking on an anchor, I'm just clicking somewhere on the screen. So I guess it's half-way there? But also, I would recommend not working on this ticket more until we've discussed it on Monday. If this is really a bug in react-native-webview, we'll have to decide if we maybe want to patch the package instead.

About patching this package someone did this already but for some reason it got closed:
react-native-webview/react-native-webview#3201

@LeandraH LeandraH marked this pull request as ready for review August 30, 2024 12:34
@LeandraH
Copy link
Contributor

About patching this package someone did this already but for some reason it got closed: react-native-webview/react-native-webview#3201

Nice find! Looks like that could be a good starting point; we'd have to make sure that we indeed don't have inputs or other possible elements that this bug fix might misbehave with.

@steffenkleinle
Copy link
Member

@bahaaTuffaha I think this does not fix the issue, right? Should we close the PR then?

@steffenkleinle steffenkleinle deleted the 2886-Not-working-Link-in-Aschaffenburg branch September 26, 2024 10:26
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.

Not working Link in Aschaffenburg
3 participants