-
Notifications
You must be signed in to change notification settings - Fork 57
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
EZP-30032: CustomTags not saved correctly #833
Conversation
src/bundle/Resources/public/js/alloyeditor/src/buttons/ez-btn-customtag-update.js
Outdated
Show resolved
Hide resolved
@@ -210,6 +210,8 @@ | |||
*/ | |||
setName: function(name) { | |||
this.element.data('ezname', name); | |||
window.clearTimeout(this.setNameFireEditorInteractionTimeout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each timeout handler should be defined at the top (after the editables
object).
setNameFireEditorInteractionTimeout: null
@@ -263,6 +265,8 @@ | |||
setAlignment: function(type) { | |||
this.wrapper.data(DATA_ALIGNMENT_ATTR, type); | |||
this.element.data(DATA_ALIGNMENT_ATTR, type); | |||
window.clearTimeout(this.setAlignmentFireEditorInteractionTimeout); | |||
this.setAlignmentFireEditorInteractionTimeout = window.setTimeout(this.fireEditorInteraction.bind(this,'aligmentUpdated'), 50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after ,
in bind(this,'aligmentUpdated')
, applies in other cases.
@@ -274,6 +278,8 @@ | |||
unsetAlignment: function() { | |||
this.wrapper.data(DATA_ALIGNMENT_ATTR, false); | |||
this.element.data(DATA_ALIGNMENT_ATTR, false); | |||
window.clearTimeout(this.unsetAlignmentFireEditorInteractionTimeout); | |||
this.unsetAlignmentFireEditorInteractionTimeout = window.setTimeout(this.fireEditorInteraction.bind(this,'aligmentRemoved'), 50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those lines seem to be too long. Do you use Prettier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I will in the future, thanks!
d366606
to
c35b8ac
Compare
Could you merge it up? |
done |
This PR adds a line to fire
editorInteraction
event at the end of CustomTag creation in RichText so AlloyEditor's UI is updated and aware of the changes.As a side effect this PR fixes also this issue: https://jira.ez.no/browse/EZP-30010