User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Added the calling of connectedCallback in the constructor, because the buttonElement had undefined value. The connectedCallback was called only after the constructor and as the result buttons were enabled or disabled only after the first click.
Check toolbars in administration mode.
Some buttons like batch or change status have to work only when a category (or article) is selected.
It works fine after this addition
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change |
Labels |
Added:
NPM Resource Changed
?
|
BTW, this works fine!
I corrected it directly. :)
Please do not modify anymore your maliouris:4.0-dev branch
Yeah sorry, I dont know why this happened
I have tested this item
Thank you!
restarted drone
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Labels |
rtc
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-03-20 07:23:31 |
Closed_By | ⇒ | infograf768 |
Thanks.
woh, that was fast and that is wrong
Added the calling of connectedCallback in the constructor, because the buttonElement had undefined value.
the fix are wrong, connectedCallback
are part of CE API called when element actually attached to DOM. it should not be called in constructor, it for sure introduce some more fancy bugs.
A proper fix is to find out why buttonElement
not defined,
that something went wrong with #23767
I saw the changes that were made in the other pull request and as far as I can see this.buttonElement = this.querySelector('button, a'); was called in the constructor and after the change it was called in connectedCallback() with no usage at all. I moved it back to the constructor and it works properly now. Should I make a new pull request ?
@maliouris yes please
:)
@maliouris another possible way to fix is to move this part
// If list selection is required, set button to disabled by default
if (this.listSelection) {
this.setDisabled(true);
}
to connectedCallback
, somwhere after this.buttonElement = ...
Which one do you want think it's better?
second one, but need to test whether it will work
It worked for me
Drone failing. Please correct the unwanted tabs (useless new line)