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

jQuery event is not working on android version #2992

Closed
Wings1986 opened this issue Jun 9, 2023 · 3 comments
Closed

jQuery event is not working on android version #2992

Wings1986 opened this issue Jun 9, 2023 · 3 comments
Labels
Stale Type: feature request New feature or request

Comments

@Wings1986
Copy link

Here is html file used:

const links = document.querySelectorAll("a[href]");
[].forEach.call(links, (link) =>
link.addEventListener("click", (e) => {
e.preventDefault();
let target = e.target;

const title = target.text;       <---   got title= "Continue"
const hrefUrl = target.href;     **<--- hrefUrl is empty**

});

Here is react native code

<WebView
ref={webViewRef}
originWhitelist={["*"]}
source={{ html: currentPage.html }}
bounces={false}
setSupportMultipleWindows={true}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
javaScriptEnabled={true}
startInLoadingState={true} // when starting this component
javaScriptEnabledAndroid={true}
scalesPageToFit={true}
injectedJavaScript={window.isNativeApp = true; window.myPath = '${currentPage?.liquid?.page_current_url}';}
mixedContentMode="compatibility"
onNavigationStateChange={handleWebViewNavigationStateChange}
onMessage={handleMessage}
/>

I got hrefUrl is empty on android version. but got correct value on iOS version
What is the solution?

@Wings1986 Wings1986 added the Type: feature request New feature or request label Jun 9, 2023
@wflanagan
Copy link

I work with @Wings1986 as well. It's possible that the #2985 ticket is a similar thing? That some pages wouldn't "work" could be a clickable link issue?

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

@Masab-M
Copy link

Masab-M commented Nov 28, 2023

had same issue on single first home page hamburger menu script is not working after build but work fine in expo and simulator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants