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

[FIX] url click events in the cordova app open in external browser or not at all #7205

Merged

Conversation

flaviogrossi
Copy link
Contributor

@RocketChat/core
this should fix the following problems:

  • exception on touchmove events in the cordova app
  • http links are not opened in an external browser in the cordova app
  • sometimes url clicks are not handled because the touchMoved variable is set

Please let me know if this also works for you.

Closes RocketChat/Rocket.Chat.Cordova#142 and #7075

@TheReal1604
Copy link
Contributor

Maybe this PR also fix #5468 ?

@flaviogrossi
Copy link
Contributor Author

flaviogrossi commented Jun 9, 2017

@TheReal1604 it should, and this problem mentioned in a comment there:

If the link is Https://google.com - (Capital H at the start) then both the heading and the URL cause the issue

should be fixed by making this regexp case insensitive

Of course, please feel free to test this PR and let me know if everything is ok for you.

EDIT: i added a new commit to also fix this.

@geekgonecrazy
Copy link
Contributor

@flaviogrossi thanks for opening this PR! I know this is an issue that has plagued my self and others for a while now.

@graywolf336
Copy link
Contributor

This will be awesome to have fixed!

@JSzaszvari
Copy link
Contributor

Omg, yes

Amazing - Thanks so much

Let's get this in a release please :D

@JSzaszvari
Copy link
Contributor

JSzaszvari commented Jul 6, 2017

@geekgonecrazy - Can we get this popped into the next release? It's a pretty big usability problem and I know the issue has frustrated some of our users to the point where they no longer use RC on mobile.

Please

🥇 👍

@geekgonecrazy geekgonecrazy added this to the 0.58.0 milestone Jul 6, 2017
@geekgonecrazy
Copy link
Contributor

@JSzaszvari agreed. We need to get this in. Its very annoying on mobile web even. Hard to click links

@@ -184,7 +184,7 @@ Template.main.events({
},
'touchmove'(e, t) {
if (t.touchstartX != null) {
const [touch] = e.originalEvent.touches;
const touch = e.originalEvent.touches[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you changed that? It isn't the same thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed because it seems that the TouchList object is not iterable on (some?) mobile platforms, thus raising an exception on every scroll event in the cordova app.

More details are here: #7075

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok 👍

Copy link
Contributor

@geekgonecrazy geekgonecrazy left a comment

Choose a reason for hiding this comment

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

Tested and confirmed this fixes the issue.

@geekgonecrazy geekgonecrazy merged commit 5cb30b4 into RocketChat:develop Jul 7, 2017
reist pushed a commit to seekingalpha/Rocket.Chat that referenced this pull request Jul 25, 2017
… not at all (RocketChat#7205)

* fix url click events in the cordova app

fixes RocketChat/Rocket.Chat.Cordova#142

* make urls regexp case insensitive since mobile devices often autocapitalize them
@JSzaszvari
Copy link
Contributor

Team, can we please ensure this is in the next release? It's a pretty big one that's cause a lot of issues now for nearly a year.

@geekgonecrazy
Copy link
Contributor

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.

Clicking on a link inside the application should open it in an external browser
6 participants