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

fix(upload-file): Function must run only when a specific class or attribute is added. #369

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

creador-dev
Copy link
Member

Added SUI_BODY_CLASS and defined if($( 'SUI_BODY_CLASS .sui-file-upload' ).length) to check whether element present in DOM or not.

@iamleigh iamleigh assigned iamleigh and creador-dev and unassigned iamleigh Nov 2, 2021
@iamleigh iamleigh added the improvement Improvements for current features label Nov 2, 2021
@iamleigh iamleigh changed the title ✨ enhancement(upload file): Upload file function must run only once fix 🐛 fix(upload-file): Function must run only when a specific class or attribute is added. Nov 2, 2021
Copy link
Contributor

@iamleigh iamleigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@creador-dev please, use another class name or an attribute instead because we already have sui-upload-file and the one you're using here might get confused the developers since you only switch places the file and upload words.

@creador-dev creador-dev requested a review from iamleigh November 2, 2021 23:12
@iamleigh iamleigh changed the title 🐛 fix(upload-file): Function must run only when a specific class or attribute is added. fix(upload-file): Function must run only when a specific class or attribute is added. Nov 30, 2021
@iamleigh iamleigh changed the base branch from development to version/2.12.1 November 30, 2021 17:01
@iamleigh iamleigh merged commit fa34fd3 into wpmudev:version/2.12.1 Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements for current features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants