Remove touch events

Remove touch events, it breaks clicking links on mobile
This commit is contained in:
dayinjing 2021-11-11 20:33:56 -06:00 committed by GitHub
parent 100d91c9b6
commit 579c4424d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -157,7 +157,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
{this.props.site_res.site_view && ( {this.props.site_res.site_view && (
<Link <Link
to="/" to="/"
onTouchEnd={linkEvent(this, this.handleHideExpandNavbar)}
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)} onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={ title={
this.props.site_res.site_view.site.description || this.props.site_res.site_view.site.description ||
@ -181,7 +180,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
<Link <Link
to="/inbox" to="/inbox"
className="p-1 navbar-toggler nav-link border-0" className="p-1 navbar-toggler nav-link border-0"
onTouchEnd={linkEvent(this, this.handleHideExpandNavbar)}
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)} onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("unread_messages", { title={i18n.t("unread_messages", {
count: this.state.unreadInboxCount, count: this.state.unreadInboxCount,
@ -203,7 +201,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
<Link <Link
to="/reports" to="/reports"
className="p-1 navbar-toggler nav-link border-0" className="p-1 navbar-toggler nav-link border-0"
onTouchEnd={linkEvent(this, this.handleHideExpandNavbar)}
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)} onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("unread_reports", { title={i18n.t("unread_reports", {
count: this.state.unreadReportCount, count: this.state.unreadReportCount,
@ -239,7 +236,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
<Link <Link
to="/communities" to="/communities"
className="nav-link" className="nav-link"
onTouchEnd={linkEvent(this, this.handleHideExpandNavbar)}
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)} onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("communities")} title={i18n.t("communities")}
> >
@ -253,7 +249,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
prevPath: this.currentLocation, prevPath: this.currentLocation,
}} }}
className="nav-link" className="nav-link"
onTouchEnd={linkEvent(this, this.handleHideExpandNavbar)}
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)} onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("create_post")} title={i18n.t("create_post")}
> >
@ -265,7 +260,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
<Link <Link
to="/create_community" to="/create_community"
className="nav-link" className="nav-link"
onTouchEnd={linkEvent(this, this.handleHideExpandNavbar)}
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)} onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("create_community")} title={i18n.t("create_community")}
> >
@ -289,7 +283,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
<Link <Link
to="/admin" to="/admin"
className="nav-link" className="nav-link"
onTouchEnd={linkEvent(this, this.handleHideExpandNavbar)}
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)} onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("admin_settings")} title={i18n.t("admin_settings")}
> >
@ -338,7 +331,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
<Link <Link
className="nav-link" className="nav-link"
to="/inbox" to="/inbox"
onTouchEnd={linkEvent(this, this.handleHideExpandNavbar)}
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)} onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("unread_messages", { title={i18n.t("unread_messages", {
count: this.state.unreadInboxCount, count: this.state.unreadInboxCount,
@ -450,7 +442,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
<Link <Link
to="/login" to="/login"
className="nav-link" className="nav-link"
onTouchEnd={linkEvent(this, this.handleHideExpandNavbar)}
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)} onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("login")} title={i18n.t("login")}
> >
@ -461,7 +452,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
<Link <Link
to="/signup" to="/signup"
className="nav-link" className="nav-link"
onTouchEnd={linkEvent(this, this.handleHideExpandNavbar)}
onMouseUp={linkEvent(this, this.handleHideExpandNavbar)} onMouseUp={linkEvent(this, this.handleHideExpandNavbar)}
title={i18n.t("sign_up")} title={i18n.t("sign_up")}
> >