2017-08-04 88 views
0

此bug僅在Android kit-kat版本中可見。當使用谷歌地圖時,Ionic 3 - Signature Pad未在android kit-kat上打開

我打開從具有谷歌地圖的頁面簽名墊。本頁的Html如下所示。

<ion-content> 
    <button (click)="openPad()">Open Pad</button> 
    <div #map id="map" style="height:100%;"></div> 
</ion-content> 

這在我測試過的瀏覽器和其他android版本中正常工作。但簽名墊不在android kit-kat中打開。

當我沒有在該頁面中使用任何地圖時,簽名板在kit-kat中打開。下面的HTML代碼的Android包-KAT工作正常

<ion-content> 
    <button (click)="openPad()">Open Pad</button> 
    <!-- <div #map id="map" style="height:100%;"></div> --> 
</ion-content> 

幫助我解決這個bug

回答

0

你可以嘗試先禁用地圖 的單擊事件之前,您可以點擊按鈕打開signaturepad

public PrepareSignaturePad(): void { 
    // Disable the map 
    this.map.setClickable(false); 
    //then call the funcation for openning the signaturepad 
    this.openPad(); 
} 
+0

setClickable(false)不起作用。當我將地圖移除爲this.map.remove()時,它工作正常。我知道這是影響我的應用程序的性能。如果有任何問題,請提出更好的方法 –

相關問題