HubSpot / vex

A modern dialog library which is highly configurable and easy to style. #hubspot-open-source
http://github.hubspot.com/vex/docs/welcome
MIT License
6.93k stars 497 forks source link

vex prompt input field is disabled #132

Open vkamtpr opened 8 years ago

vkamtpr commented 8 years ago

I am working on using vex prompt to get users to enter a value. I am not sure what I am doing wrong but in some cases the input textfield is disabled.

I have 2 routines to ask the user to enter a value, when they add a new value the text input is fine but when they edit the existing value that is when the input is disabled.

Is there any condition in vex when the input is disabled ?

Please reply asap.

Add: image

Edit where the field is disabled: image

adamschwartz commented 8 years ago

Hey @vkamtpr, I’d be happy to help. Thanks for providing those screenshots. Would you mind also sharing a code snippet or a link to a page exhibiting the issue so we can dig into it a little further? Thanks.

vkamtpr commented 8 years ago

This is still on our development server which is not exposed outside so you may not be able to see how it behaves. Below are the code snippets of both "add" and "edit" functionality. I hope that helps.

"Create"

                    Messaging.prompt('Enter title of group', 'Group Title', function(groupTitle) {
                        if(groupTitle!==false && groupTitle.trim()!==''){
                            }
                    });

"Edit"

Messaging.prompt('Enter new group title:', scope.group.title, function(response) {
                            if (!_.isEmpty(response)) {
                                scope.group.title = response;
                                scope.$apply();
                                NotebookService.updateNote(scope.group);
                            }
                    });

Utilty Function that calls vew prompt

    Service.prompt = function(message, placeholder, callback) {
        return vex.dialog.prompt({
            message: message,
            placeholder: placeholder,
            callback: callback
        });
    };
adamschwartz commented 8 years ago

I replicated the situation you have here as best I could with this jsFiddle, and it seems to work fine.

Is it possible you have some other code which is disabling the input? I don’t see anything here that indicate that, but it’s possible there’s more code on your end. For example, how does Messaging.prompt end up calling the same thing as Service.prompt?

vkamtpr commented 8 years ago

I checked my code again and again to see if there is any place I am disabling that input, I can not find it :( So vex does never disable the input ?

I can screen share with you if that was at all possible ? Google Hangout ?

​thanks, Prasad Kamthekar Learning Apps Engineering

On Thu, Jul 30, 2015 at 10:20 AM, Adam Schwartz notifications@github.com wrote:

I replicated the situation you have here as best I could with this jsFiddle http://jsfiddle.net/adamschwartz/1qchfkj7/, and it seems to work fine.

Is it possible you have some other code which is disabling the input? I don’t see anything here that indicate that, but it’s possible there’s more code on your end. For example, how does Messaging.prompt end up calling the same thing as Service.prompt?

— Reply to this email directly or view it on GitHub https://github.com/HubSpot/vex/issues/132#issuecomment-126408695.

adamschwartz commented 8 years ago

Sorry for the delay, @vkamtpr. If you can mimic the behavior you’re seeing on your development server (which, as you mentioned above, is not available publicly) on something like jsFiddle, or any other public facing site, I’d be happy to help you debug this further.

vkamtpr commented 8 years ago

Adam,

I am not able to mimic this on the jsFiddle as it always shows up as not disabled. I can however show you on Google Hangout if you have 15 mins to spare on this. I would really appreciate.

​thanks, Prasad Kamthekar Learning Apps Engineering

On Mon, Aug 10, 2015 at 2:44 PM, Adam Schwartz notifications@github.com wrote:

Sorry for the delay, @vkamtpr https://github.com/vkamtpr. If you can mimic the behavior you’re seeing on your development server (which, as you mentioned above, is not available publicly) on something like jsFiddle http://jsfiddle.net, or any other public facing site, I’d be happy to help you debug this further.

— Reply to this email directly or view it on GitHub https://github.com/HubSpot/vex/issues/132#issuecomment-129620187.