-
Notifications
You must be signed in to change notification settings - Fork 157
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 #2734 by Setting List Metadata applyListStyleFromLevel: true
when toggling a list
#2743
Fix #2734 by Setting List Metadata applyListStyleFromLevel: true
when toggling a list
#2743
Conversation
if (level) { | ||
updateListMetadata(level, metadata => | ||
Object.assign({}, metadata, { | ||
applyListStyleFromLevel: true, |
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.
besides here, when do we set this metadata to true?
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.
The other place we set this metadata is when indenting a List. In setModelIndentation.ts
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.
Ok, I tested, and I did not find any regressions.
if (level) { | ||
updateListMetadata(level, metadata => | ||
Object.assign({}, metadata, { | ||
applyListStyleFromLevel: true, |
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.
Ok, I tested, and I did not find any regressions.
This will also fix #2735 |
* Export DefaultSanitizers to be available in roosterjs-content-model-plugins package #2739 * Fix #2741 by changing Id selectors from `#{id}` to `[id="{id}"]` (#2742) * init * Fix build * fix selection * fix * fixes * remove console.log * fix test * Fix #2734 by Setting List Metadata `applyListStyleFromLevel: true` when toggling a list (#2743) * init * Tests * add missing file * crop alternative * Fix #2733 by changing the approach to announce repeated announce messages (#2745) * init * move string to constant * bump version --------- Co-authored-by: vhuseinova-msft <98852890+vhuseinova-msft@users.noreply.github.com> Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com> Co-authored-by: Julia Roldi (from Dev Box) <juliaroldi@microsoft.com> Co-authored-by: Julia Roldi <87443959+juliaroldi@users.noreply.github.com>
This will fix #2734.
Right now, we do not set metadata when toggling a numbering or bullet list.
This causes getListAnnounceData to return undefined, so when using Enter on a List we do not announce anything.
To fix, always set the applyListStyleFromLevel metadata so we announce the new list item marker.
To test:
Before
No announcing of the new list item
After
We announce the new list item marker.