LinkedIn 应用内浏览器 Ionic 和 Angular 应用按钮点击不起作用

问题描述 投票:0回答:0

指向我们 Angular 应用程序公共页面的链接通常在 LinkedIn 帖子上共享。在桌面或移动网络浏览器上查看时,这些都很好。

然而,当点击 iOS LinkedIn 应用程序时,他们会在 LinkedIn 应用程序内浏览器中打开许多问题,但其中最主要的是按钮不起作用!

这是一个 Angular 14 和 Ionic 6.1 应用程序。最初按钮是这样实现的:

<ion-button type="button" class="begin flat-btn" [ngStyle]="{
        fontSize: buttonStyle.fontSize + 'px',
        fontWeight: buttonStyle.fontWeight,
        fontFamily: fontFamily,
        color: buttonStyle.colour,
        '--background': buttonStyle.backgroundColour,
        '--background-hover': buttonStyle.hoverColour
      }" shape="round" (click)="beginBegin
    </ion-button>

以上从未显示过,所以我尝试了标准的 HTML 按钮:

<button type="button" class="begin flat-btn" [ngStyle]="{
            fontSize: buttonStyle.fontSize + 'px',
            fontWeight: buttonStyle.fontWeight,
            fontFamily: fontFamily,
            color: buttonStyle.colour,
            'background': buttonStyle.backgroundColour,
            'background-hover': buttonStyle.hoverColour,
            '--background': buttonStyle.backgroundColour,
            '--background-hover': buttonStyle.hoverColour
          }" shape="round" (click)="begin()">Begin
        </button>

这些现在显示,但点击开始什么都不做!有趣的是,我在旧版 angularjs 应用程序上遇到了完全相同的问题!

仅供参考,begin 函数发出一个应该冒泡到顶部组件的 EventEmitter。因为我无法为此设置适当的调试环境,所以我可以说 100% 哪里出错了,但我的假设是它在单击时甚至没有调用该函数。

非常欢迎任何关于可能导致此问题的建议,甚至是调试它的方法。

n.b.我已经尝试过其他应用内浏览器,例如 Messenger 以及 iOS WebView 测试仪,一切正常。

angular ionic-framework linkedin
© www.soinside.com 2019 - 2024. All rights reserved.