Open haobibo opened 7 years ago
I think this is fine... there are other elements that end up mixing in this behavior... @haobibo did you do a sniff test around all the other elements to make sure there is no obvious issues with writing outside the element's context?
@lbustelo It seems a lot work to do if we test error display behavior because many elements use this behavior.
Can we just do this improvement to urth-core-funciton
? This commit ( 0d453b4 ) will only change the behavior for urth-core-function
.
@haobibo I don't think it is ok for a behavior to have explicit knowledge of elements that may mix-in the code. error-display-behavior
should know know anything about the existence of urth-core-function
.
@lbustelo the latest commit allow urth-core-function
to listen click events only for its children elements instead of itself.
However, the build tests failed with bower ECONFLICT Unable to find suitable version for test-fixture
.
Sounds to me like dependency hell... Some dependency somewhere needs to be temporarily pegged or the tests need to be updated to support new versions.
Before: error message append into
After: error message append after .
This is particularly useful when users write
<urth-core-function><buton>invoke</button></urth-core-function>
. Before this improvements, when users click on the error message, the function will be invoked again (click event broadcast to error message). After this improvement, this issue is fixed.