Giter Club home page Giter Club logo

cordova-plugin-actionsheet's People

Contributors

bpappin avatar eddyverbruggen avatar ggozad avatar nit23uec avatar pavel-durov avatar revolunet avatar romaindev25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-actionsheet's Issues

WhatsApp?

Hello,

Any chance of including the WhatsApp share option on the menu?

Thanks.

Conflict when using with keyboard shrinkView plugin

@EddyVerbruggen I'm using this plugin along with keyboard shrinkView plugin, I have page with 2 buttons which is trigger the action sheet and the other trigger the shrinkView through input focus after we click the button.

If I'm click the action sheet button and cancel it, then click another button and programatically put the focus on the input. All keyboard shrinkView events didn't trigger at all.

Do you have any idea about this? I tried to dig both code and I found about the self.webView and self.webView.superView which is maybe be the culprit. If you have any feedback, I really appreciated because I'm really in a tight deadline.

Cache actionsheet instance

Hi @EddyVerbruggen. I noticed that for long list of items showing the menu might have a noticable delay. Is is possible to cache an actionsheet instance in memory to improve performance? If yes, how it can be applied to API?

Actionsheet breaks virtual keyboard.

Given an iOS app with a text input, tap the input. The virtual keyboard appears.

If an actionsheet is opened, all inputs will require two taps, one to focus and another to make the virtual keyboard appear. This behavior will persist until the app is restarted.

I've observed this bug on iOS 8 and 9.

Thank you!

Can't share the photo on IOS

Hi,

I have used the plugin but I can't share the photo on the IOS, but the android is working just fine!

The is any one with this issue to?

some issue feedback to you

hi @EddyVerbruggen
I am using PGB 3.5 and your latest plugin 1.0.0 (Android 4.0.3 and ios 7.1.2)
I have some issue and suggestion by in version 1.0.0

I can set "androidEnableCancelButton" to true (show) or false (hidden) and set the label value by another attribute "addCancelButtonWithLabel"
well...

one
is it possible set a new attribute "iosEnableCancelButton" to do the same thing like android maybe future ?

two
in ios,no mater I set "addCancelButtonWithLabel" to which value,the ios's "CancelButton" still not appear (really tried many times)

third
is there any plan to develop winphone version ?

PopupMenu for Windows

As discussed in #32 this plugin does not seem to work on Windows 8.1 or Windows 10 UWP. I think the most "native" solution for Windows 10 is to use Windows.UI.Popups.PopupMenu as documented in https://docs.microsoft.com/en-us/uwp/api/windows.ui.popups.popupmenu. (I am not sure about Windows 8.1 or Windows Phone 8.1. I not recommend actively supporting these platforms.)

I made https://github.com/brodybits/cordova-windows-popup-test-app which demonstrates an implementation of this idea based on a fork of cordova-plugin-dialogs (see https://github.com/brodybits/cordova-plugin-dialogs/tree/windows-popup-test-master). The first popup button in this demo shows this working in Windows.UI.Popups.PopupMenu. I think the most tricky part is to calculate the coordinates needed to show the Windows.UI.Popups.PopupMenu in the right place.

I hope we can fix this issue in this plugin. I also raised https://issues.apache.org/jira/browse/CB-12553 in case we want to fix this in cordova-plugin-dialogs as well (or instead).

Prevent orientation switch

I have my application locked to portrait for iOS however, when I turn the Device in landscape with the scion sheet opened, it switches to landscape when I only want it to stay in portrait mode even if the device is in landscape. I don't want to hide th action sheet, I just want to lock the orientation

Unicode characters not working

Spanish characters are getting corrupted.

        var options = {
            'buttonLabels': ['Español', 'Inglés'],
            'addCancelButtonWithLabel': 'Cancelar'
        };        

        window.plugins.actionsheet.show(options, app.optionsCallback);

screen shot 2016-02-15 at 5 33 56 pm

there is no "iosEnableCancelButton" attribute to set ?

hi @EddyVerbruggen
I am using your latest plugin 1.1.1
according to this
https://raw.githubusercontent.com/EddyVerbruggen/cordova-plugin-actionsheet/6fafd99c4d21d430814ef582a0fb888cdf3c48d3/screenshots/ios/ios-share.png
the ios can show the "Cancel" button,but I tried many times, "Cancel" button still not appear (Android and winphone are work well)

so I notice that in the document,there is no such like "iosEnableCancelButton" attribute can let me to set,I think this is the problem is

Disable shadow style on iPad

Is it possible to disable the shadow style that is shown around the actionsheet on iPad? Looks a bit odd, I would prefer that the entire screen is blocked out.

Current style:
current-style

Improvement:
better-style

No Popup on WP8.1

Cordova - WP8.1 (Visual Studio 2015),
I debugged several hours, but i cant find the solution... please help...

VS Settings: Debug - Windows Phone (Universal) - Emulator8.1

What could i find out:

  • after deviceReady
  • window.plugins.actionsheet.show - is called
  • ActionSheetProxy.js -> ActionSheet.prototype.show - is called to
  • But i cant see any PopUp (on WP8.1 - but Android works very well)

To validate, I started with a new super stupid Project, add your pluging and add following:

  • Microsoft.WinJS.1.0/css/ui-dark.css
  • Microsoft.WinJS.1.0/js/base.js
  • Microsoft.WinJS.1.0/js/ui.js

function testPopup()
{
var options =
{
'androidTheme': window.plugins.actionsheet.ANDROID_THEMES.THEME_HOLO_LIGHT, // default is THEME_TRADITIONAL
'title': 'Please help?,
'buttonLabels': ['hm', 'no popup'],
'androidEnableCancelButton': true,
'winphoneEnableCancelButton': true,
'addCancelButtonWithLabel': 'Cancel'
};
window.plugins.actionsheet.show(options, callback);
};

testPopup();

Next touch disrupted in iOS after the action sheet is closed?

First off, huge thanks to Eddy for the action sheet plugin. So happy to have this.

My issue: For some reason, the first touch the user makes once the action sheet closes doesn't seem to be registered by my app (as far as I can tell). But the second (and all future taps) are fine.

I'm using Cordova 3.4.1-0.1.1-dev, with an app built largely in AngularJS. I'm bringing up the action sheet after a user does a long touch on a full-screened image. The action sheet lets the user save the image, or Cancel. Regardless of whether the user saves or cancels, after the action sheet closes, the "Back" button on the corner of the image stops working - at least for one tap. Only works on the second tap - or if the user's tapped anywhere else on the screen before hitting "Back". Basically, it feels like the first tap is getting suppressed.

Inspecting the page's elements (using the Safari "Inspect" tool) doesn't reveal any sort of out-of-the-ordinary layers in the way. The ng-click function simply isn't getting called until the second tap. I've even tried setting up a new event listener (via JQuery) on the "Back" button once the action sheet closes, but again, the listener's handler is only called on the second tap.

Only happens in iOS. No problems in Android.

Could be something I'm doing wrong, but so far I'm scratching my head. Curious if anyone else has seen anything similar.

Thanks!

Crash on IOS 10

Is there any workaround to prevent the crash on ios 10 when the plugin is used 2/3 times in a row?

unable to build actionsheet plugin with Phonegap build

PGB IOS build failed with this msg:
unable to create app: plugin unsupported: nl.x‐services.plugins.actionsheet.

Only change I made to my app was to add
<gap:plugin name="nl.x‐services.plugins.actionsheet" />
to config.xml.
My index.html file has the usual reference to phonegap.js
`

<script src="phonegap.js"></script>

`

Position of destructive button

Hi @EddyVerbruggen,

the destructive button is always on first position, even when added later to the options array. Is there any way to decide where to show it? Or at least to put it at bottom?

use a background thread

My Cordova log is yelling all the time. Maybe it is not really necessary but could you use a background thread when calling the action sheet?

Crashes the app on iOS after cordova update

Hello.

I have been using this plugin, however after I do a little update on cordova, ionic-cli, ionic platform, other plugins etc. (not sure which one is causes it), it started to crash the app on ios.

When action sheet code gets executed, the app freezes. After running the app on iOS, I realised that it seems to enter an infinite loop (see image below).

screen shot 2016-01-14 at 05 04 06 2

"1.1.4" version have some question want to ask

I am using PGB 3.7 with 1.1.4 version plugin
these are my sample code

<script type="text/javascript">
function checkActionSheet()
{
 var options = 
 {
 'androidTheme': 1, //the default is 1,1:THEME_TRADITIONAL、2:THEME_HOLO_DARK、3:THEME_HOLO_LIGHT、4:THEME_DEVICE_DEFAULT_DARK、5:THEME_DEVICE_DEFAULT_LIGHT
 'title': 'how?',
 'buttonLabels': ['Facebook', 'Twitter'],
 'androidEnableCancelButton' : true,
 'winphoneEnableCancelButton' : true,
 'addCancelButtonWithLabel': 'cancel',
 'addDestructiveButtonWithLabel' : 'delete'
 };
window.plugins.actionsheet.show(options, callback);
setTimeout(function() { window.plugins.actionsheet.hide({}, onSuccess, onError); }, 3000);
};

function callback(buttonIndex) 
{
alert("buttonIndex:" + buttonIndex, null);
}

function onSuccess()
{
alert("success");
}

function onError()
{
alert("fail");
}
</script>

according to the latest document
http://plugins.cordova.io/#/package/nl.x-services.plugins.actionsheet

[question 1]
it said

'androidTheme': window.plugins.actionsheet.ANDROID_THEMES.THEME_HOLO_LIGHT, // default is THEME_TRADITIONAL

but in fact,it should be modify to this

 'androidTheme': 1, //the default is 1,1:THEME_TRADITIONAL、2:THEME_HOLO_DARK、3:THEME_HOLO_LIGHT、4:THEME_DEVICE_DEFAULT_DARK、5:THEME_DEVICE_DEFAULT_LIGHT

[question 2]
when I trigger "checkActionSheet" function
it will also trigger window.plugins.actionsheet.hide({}, onSuccess, onError); after three seconds
well...
but no mater which platform is
the "onSuccess" or "onError" will never trigger

[question 3]
after three seconds passed...
in Android and winphone,it will trigger "nothing"
but in iOS,it will automatically trigger "callback" javascript function and alert buttonIndex is "-1"
so...is the iOS's logical correct ?

issue on ios10 using the plugin on a native modal view

First thanks for the awesome plugin.

Im having a problem when I use this plugin on a native modal view(im using appgyver steroids), actionsheet loads fine but when any button is pressed it just close the modal view. It works fine on webviews this issue is just happening on modal views and it was working fine on the previous version.

Any ideas?

Actionsheet + Camera

This plugin seems to break the cordova camera plugin in Cordova v. 3.6.3 - ios8.
I get the following errors when calling the camera after making a selection in the action sheet:

Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates. Nov 9 01:52:02 Cams-iPhone Mid-Pacific[8993] <Error>: CGAffineTransformInvert: singular matrix.

I'm trying to do something similar to how Instagram allows you to select a photo from your library or take a new one if that helps explain how the issue is happening.

Themes deprecated by Android API 23

According to this article, THEME_DEVICE_DEFAULT_LIGHT and the entire family of THEME constants have been deprecated by API 23. I'm afraid that this problem could crash the plugin when building with future API versions, is there a way to be prepared for this? Thanks.

AutoReleasePool Crash on iOS10

Not sure how to debug this... when launching the action sheet after a few times it crashes the app and the debugger goes to the autoreleasepool in main.m

I put it in a try catch but there is no error other then (llbl)
No out put or anything.

And it only happens when i go to to the action menu after a couple of times.

Deprecations in ActionSheet.m

Hi,
It looks like there's some deprecated methods (since Cordova 3.6) used in the iOS ActionSheet file.
This doesn't affect the fonctionnality, but it could be nice to use the latest methods to be sure that Cordova updates won't break your cool plugin.

screen shot 2015-02-27 at 18 29 34

Support easy dismiss instead of Cancel button

Is "easy dismiss" a UX pattern in iOS? It is in Windows and Android. So I wonder if it would be possible to add easy dimiss to this plugin.
What is easy dismiss? Its when you tap outside the alert/action sheet it closes it.

[Maybe a problem] about the status bar

hi @EddyVerbruggen
according to this
https://raw.githubusercontent.com/EddyVerbruggen/cordova-plugin-actionsheet/6fafd99c4d21d430814ef582a0fb888cdf3c48d3/screenshots/wp8/wp8-share.jpg
WP8 work great ~

but look at my screenshot,it work great too,but...
http://www.littlebau.com/statuswin.png
because I use the "Status Bar" plugin to hidden the system bar
https://build.phonegap.com/plugins/505
the alert message window still appear under the "System Bar" lower position (maybe in this situation,it should be Snap to the "Top" ?)

thanks

Theming the dialog

Hi, Android dialog can also be themed either with predefined themes (http://developer.android.com/reference/android/app/AlertDialog.html) or by creating a custom xml theme. I am using this plugin and changed it to accept one more int option so to choose the theme too.
Maybe this should be added as a default in the plugin, because the alert dialog that is shown does not follow the new design of the Android OS and the application.

invalid package name

I happen to be working on writing an android component for this plugin.
The package nl.x-services.plugins.actionsheet is actually invalid for android, so my pull request is eventually going to have to change.

2nd/3rd time using action sheet in iOS10 causes crash

I've been able to reproduce this with 100% reliability. We're using Meteor on top of Cordova so that could be an issue as well.

To reproduce, just upgrade an app to iOS 10, put it on a device with iOS 10 (only happens on device, not simulator), and open/close an action sheet. Consistently on the 2nd/3rd time it crashes with no stack trace. This happens everywhere we use the plugin.

I added some breakpoints to see where exactly it's happening - it's [actionSheet showInView:self.webView.superview]; that's causing the crash. My hunch is it's something to do with the webview and maybe not the action sheet itself.

Failed to fetch the plugin

Getting this error while trying to add the plugin:
Failed to restore plugin "cordova-plugin-actionsheet" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin cordova-plugin-actionsheet@git+https://github.com/EddyVerbruggen/cordova-plugin-actionsheet.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL.

Using cordova version 7.0.1.

Use a Android Action Bar with Actions Buttons instead of an Alert Dialog

Hi, first of all I think it is a great idea to provide a plugin like this. If you make it more Android style guide like it will be perfect:
http://developer.android.com/design/patterns/actionbar.html

In this case this would mean to use a Android Action Bar with Actions Buttons instead of Alert Dialog. I know it is very challenging to transfer certain principles from one style guide to another, especially when they differ very much like in this case. Thank you for considering it.

Center actionsheet on iPad

Hi Eddy,

Great plugin.

Since updating to the latest version after the iOS10 bug mentioned in #41 the actionsheet opens in the top left corner on iPad, because I didn't set position values. Now I'd like the sheet to open in the middle of the screen, like before. How would I go about doing this, other than inputting pixel values for both orientations?

Regards,
Bas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.