cordova-plugin-themeablebrowser icon indicating copy to clipboard operation
cordova-plugin-themeablebrowser copied to clipboard

Custom button Themeable Browser not worikng IOS

Open manhlh opened this issue 6 years ago • 2 comments

I use Ionic 3 and Themeable Browser library, I custom button in toolbar Themeable Browser and first time click SitePointSitePressed() not run BUT click second time then run 2 event. My Code ` const me = this; this.ref = cordova.ThemeableBrowser.open(this.productUrl, '_blank', options) .addEventListener('loadstart', function () { console.log('loadstart') me.viewProduct = false; }).addEventListener('loadstop', function (event) { console.log('load done');
}).addEventListener('loaderror', function (event) { console.log('load error'); }).addEventListener('exit', function (x) { console.log('exit app'); me.clear(); }) .addEventListener('SitePointSitePressed', function (x) { me.dialogs.confirm( "", // title me.transText['addOrder'], // message
['OK', me.transText['quit']] // buttonLabels, ).then(onConfirm);

    function onConfirm(buttonIndex) {
      me.categoryService.getAllUsingGET().subscribe(data => {
        me.categorys = data;
      })
      if (buttonIndex == 1) {
        me.showloading(null)
        const link_product = x.url + '';
        me.productController.getProductionInfomationUsingPOST(link_product.replace('m.1688.com', 'detail.1688.com')).subscribe(data => {
          console.log('data form link: ', data)
          me.hideLoading();
          me.product = data;
          if (me.product.shopConfig.max == 0) {
            navigator.notification.alert("Sản phẩm đã hết hàng", null, me.transText['notiTitle']);
          } else {
            me.getProductColor(me.product)
            me.ref.hide();
          }
        }, error => {
          alert(me.transText['getInfoProductError']);
          me.hideLoading();
          if (me.viewProduct == false) {
            me.ref.show();
          }
        })
      }
    }
  });`

manhlh avatar Sep 28 '18 08:09 manhlh

I also met, did you solve it?

jinshuokang avatar Aug 30 '19 07:08 jinshuokang

I also met, did you solve it?

Yep, i can fix it. You download and replace "cordova-plugin-themeablebrowser" plugin in plugin folder. step: remove plugin themeable > remove platform > add platform > replace themeable > build

Download here: https://drive.google.com/file/d/1SMC9-xggI1gA-Z9reHE2nnfnVdrrfFUm/view?usp=sharing

manhlh avatar Dec 24 '19 03:12 manhlh