Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minified version causing form submitted multiple times #109

Open
dev0x10 opened this issue Mar 26, 2014 · 7 comments
Open

Minified version causing form submitted multiple times #109

dev0x10 opened this issue Mar 26, 2014 · 7 comments

Comments

@dev0x10
Copy link

dev0x10 commented Mar 26, 2014

I'm using the minified version and has a problem that the form will submitted multiple times.
For first submit it normals but for the 2nd submit runs twice, 3rd submit will runs 3 times, so on

@twilson63
Copy link
Owner

Is this only the minified version? Sounds like the listeners are not
un-binding. Can you share an example?

Thx

Tom

On Wed, Mar 26, 2014 at 10:01 AM, dev0x10 [email protected] wrote:

I'm using the minified version and has a problem that the form will
submitted multiple times.
For first submit it normals but for the 2nd submit runs twice, 3rd submit
will runs 3 times, so on

Reply to this email directly or view it on GitHubhttps://github.com//issues/109
.

Tom Wilson
Jack Russell Software Company Division of CareKinesis
494 Wando Park Blvd
Mount Pleasant, SC 29464
Phone: 843-606-6484
Mobile: 843-469-5856
Email: [email protected]
Web: http://www.jackhq.com
Calendar:
http://www.google.com/calendar/embed?src=tom%40jackrussellsoftware.com&ctz=America/New_Yorkhttp://www.jackhq.com/calendar

This e-mail may contain information that is confidential, privileged or
otherwise protected from disclosure by the Health Insurance Portability and
Accountability Act (HIPAA) and other state and federal laws. This
information is intended only for the individual names above. Any review,
use disclosure or dissemination of this material is strictly prohibited.
If you receive this information in error, please notify CareKinesis
immediately at 888-974-2763 and delete the original at once.

@dev0x10
Copy link
Author

dev0x10 commented Mar 26, 2014

Here is the code, and yes only the minified version

angular.module("testApp")
  .controller("AddMenuCtrl", function ($scope) {

    $scope.menu = { shopId: 2 };

    $scope.addMenu = function (content) {
       //this will runs multiple times like my report above
      if(typeof content === "object") {
        console.log("ERROR");
      }
      else {
        console.log(typeof content);
      }
    };
  });
<div class="container">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-4">
            <legend>Add Menu</legend>
            <form class="form" role="form" ng-upload="addMenu(content)" action="/menu/" method="POST">
                <input class="form-control" ng-model="menu.shopId" name="shopId" type="text" ng-hide="true" />
                <input class="form-control" ng-model="menu.name" name="name" placeholder="Menu Name" type="text" required />
                <input class="form-control" ng-model="menu.price" name="price" placeholder="Price" type="number" required />
                <textarea class="form-control description" ng-model="menu.description" name="description" placeholder="Description"></textarea>
                <input class="form-control" ng-model="menu.category" name="category" placeholder="Category" type="text" required />
                <input class="form-control" ng-model="menu.image" name="image" type="file" />
                <br />
                <input class="btn btn-lg btn-primary btn-block" type="submit" value="Add Menu">
            </form>
        </div>
    </div>

@rand0mb1ts
Copy link

I can confirm that it is only the minified version.

Great work! This has saved me tons of time!

@dev0x10
Copy link
Author

dev0x10 commented Mar 27, 2014

More info I'm using it with Angularjs v1.2.10

@twilson63
Copy link
Owner

I have been at a loss on how to troubleshoot and resolve this issue, any pointers or thoughts would be appreciated.

@dev0x10
Copy link
Author

dev0x10 commented Jun 21, 2014

You can reproduce it too, right?
How did you minify it? I didn't try to fix this problem, I will try when I'm free

@myfashionhub
Copy link

Turns out I encounter the same issue... #118. No wonder why the problem seems to have fix itself while I didn't really do anything but just used the non-minified version to help debug.

I also notice that I get this error #106 and the options before upload doesn't work correctly with minified version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants