Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Remove data-submit-wait attr from view el when resetting submit state #323

Merged

Conversation

jasonwebster
Copy link

This allows the submission prevention to operate correctly when the view's element is the form.

Fixes #322

@kpdecker
Copy link
Contributor

Seems like it's better to do a conditional with this.$el rather than appending.

    add: function(selector,context){
      return $(uniq(this.concat($(selector,context))))
    },

Add introduces a bit of otherwise unnecessary memory churn which doesn't matter that much on the client but it does impact the server-side behaviors.

@jasonwebster
Copy link
Author

TBH, if it were me, I'd just use this.el.removeAttribute

On Tuesday, 25 February 2014, Kevin Decker [email protected] wrote:

Seems like it's better to do a conditional with this.$el rather than
appending.

add: function(selector,context){
  return $(uniq(this.concat($(selector,context))))
},

Add introduces a bit of otherwise unnecessary memory churn which doesn't
matter that much on the client but it does impact the server-side behaviors.


Reply to this email directly or view it on GitHubhttps://github.com//pull/323#issuecomment-36078944
.

Jason Webster
CTO | www.metalabdesign.com

@kpdecker
Copy link
Contributor

We should use $. I have grand plans on that front ;)

https://github.com/walmartlabs/fruit-loops

On Tue, Feb 25, 2014 at 7:15 PM, Jason Webster [email protected]:

TBH, if it were me, I'd just use this.el.removeAttribute

On Tuesday, 25 February 2014, Kevin Decker [email protected]
wrote:

Seems like it's better to do a conditional with this.$el rather than
appending.

add: function(selector,context){
return $(uniq(this.concat($(selector,context))))
},

Add introduces a bit of otherwise unnecessary memory churn which doesn't
matter that much on the client but it does impact the server-side
behaviors.


Reply to this email directly or view it on GitHub<
https://github.com/walmartlabs/thorax/pull/323#issuecomment-36078944>
.

Jason Webster
CTO | www.metalabdesign.com


Reply to this email directly or view it on GitHubhttps://github.com//pull/323#issuecomment-36080121
.

@jasonwebster
Copy link
Author

I'll update the PR.

On Tuesday, 25 February 2014, Kevin Decker [email protected] wrote:

We should use $. I have grand plans on that front ;)

https://github.com/walmartlabs/fruit-loops

On Tue, Feb 25, 2014 at 7:15 PM, Jason Webster <[email protected]javascript:_e(%7B%7D,'cvml','[email protected]');>wrote:

TBH, if it were me, I'd just use this.el.removeAttribute

On Tuesday, 25 February 2014, Kevin Decker <[email protected]javascript:_e(%7B%7D,'cvml','[email protected]');>

wrote:

Seems like it's better to do a conditional with this.$el rather than
appending.

add: function(selector,context){
return $(uniq(this.concat($(selector,context))))
},

Add introduces a bit of otherwise unnecessary memory churn which
doesn't
matter that much on the client but it does impact the server-side
behaviors.


Reply to this email directly or view it on GitHub<
https://github.com/walmartlabs/thorax/pull/323#issuecomment-36078944>
.

Jason Webster
CTO | www.metalabdesign.com


Reply to this email directly or view it on GitHub<
https://github.com/walmartlabs/thorax/pull/323#issuecomment-36080121>
.


Reply to this email directly or view it on GitHubhttps://github.com//pull/323#issuecomment-36082041
.

Jason Webster
CTO | www.metalabdesign.com

@kpdecker kpdecker added the bug label Feb 27, 2014
This allows the submission prevention to operate correctly when the
view's element is the form.
@jasonwebster
Copy link
Author

Updated.

kpdecker added a commit that referenced this pull request Mar 4, 2014
Remove `data-submit-wait` attr from view el when resetting submit state
@kpdecker kpdecker merged commit f0eda1e into walmartlabs:master Mar 4, 2014
@kpdecker
Copy link
Contributor

kpdecker commented Mar 4, 2014

Released in 2.3.5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

Form submission duplication protection does not work if the view's element is the form
2 participants