Fixes data attributes support for Select widget. #7847
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
N.B! Test failing for style support, needs feedback.
This PR fixes issues with the data and style attributes support introduced in #7769
Issues:
style.*
attributes for widgets that calledWidget.prototype.assignAttributesToParseTreeNode
since this method does not have the extra handling needed forstyle.*
attributesOutstanding issue:
assignAttributesToParseTreeNode
thestyle.*
widget attributes are correctly applied to the DOM node. However, upon refresh when the style values change, the HTML output of the test shows two duplicate style attributes for the DOM node. Running the same code in the wiki in the browser, the output is as expected without the duplicate style attributes. However, this may be a case of the browser compensating for the duplicate attributes and sanitizing the HTML.For example when changing the
style.color
from black to red, this output HTML<select data-title="Title2" style="color:black;" value="TiddlyWiki">
changes to:
<select data-title="Title2" style="color:black;" value="TiddlyWiki" style="color:red;">
I was working on the Tour plugin when I came back to this as something was bothering my subconscious about this part of the implementation. @Jermolene @pmario any input would be appreciated. I will circle back to this later with fresher eyes.