Skip to content

Commit

Permalink
Set isSelected to false for formatHolder of list item (#2540)
Browse files Browse the repository at this point in the history
* Fix 262677: Allow insert entity to a specified position without changing selection

* Set isSelected to false for formatHolder of list item
  • Loading branch information
JiuqingSong authored Mar 28, 2024
1 parent c0198f4 commit b806329
Show file tree
Hide file tree
Showing 36 changed files with 399 additions and 395 deletions.
42 changes: 21 additions & 21 deletions demo/scripts/controlsV2/sidePane/presets/allPresets/listPresets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const simpleList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -78,7 +78,7 @@ export const simpleList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -130,7 +130,7 @@ export const simpleList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -191,7 +191,7 @@ export const simpleList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -266,7 +266,7 @@ export const simpleList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -307,7 +307,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -346,7 +346,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -385,7 +385,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -424,7 +424,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -472,7 +472,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -520,7 +520,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -568,7 +568,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -625,7 +625,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -682,7 +682,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -739,7 +739,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -769,7 +769,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -808,7 +808,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -856,7 +856,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -904,7 +904,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -943,7 +943,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -973,7 +973,7 @@ export const numberedList: Preset = {
],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe('align left', () => {
blocks: [para1, para2, para3],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {
Expand Down Expand Up @@ -254,7 +254,7 @@ describe('align left', () => {
blocks: [para1, para2, para3],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {
Expand Down Expand Up @@ -369,7 +369,7 @@ describe('align left', () => {
blocks: [para1, para2, para3],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: { textAlign: 'center' },
Expand Down Expand Up @@ -482,7 +482,7 @@ describe('align left', () => {
blocks: [para1, para2, para3],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: { textAlign: 'end' },
Expand Down Expand Up @@ -597,7 +597,7 @@ describe('align left', () => {
blocks: [para1, para2, para3],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {
Expand Down Expand Up @@ -717,7 +717,7 @@ describe('align left', () => {
blocks: [para1, para2, para3],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {
Expand Down Expand Up @@ -838,7 +838,7 @@ describe('align left', () => {
blocks: [para1, para2, para3],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {
Expand Down Expand Up @@ -964,7 +964,7 @@ describe('align left', () => {
blocks: [para, para2],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: { textAlign: 'justify' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('setModelDirection', () => {
formatHolder: {
segmentType: 'SelectionMarker',
format: {},
isSelected: true,
isSelected: false,
},
levels: [
{
Expand Down Expand Up @@ -142,7 +142,7 @@ describe('setModelDirection', () => {
formatHolder: {
segmentType: 'SelectionMarker',
format: {},
isSelected: true,
isSelected: false,
},
levels: [
{
Expand Down Expand Up @@ -178,7 +178,7 @@ describe('setModelDirection', () => {
formatHolder: {
segmentType: 'SelectionMarker',
format: {},
isSelected: true,
isSelected: false,
},
levels: [
{
Expand Down Expand Up @@ -209,7 +209,7 @@ describe('setModelDirection', () => {
formatHolder: {
segmentType: 'SelectionMarker',
format: {},
isSelected: true,
isSelected: false,
},
levels: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ describe('indent', () => {
},
],
blocks: [para1, para2, para3],
formatHolder: { segmentType: 'SelectionMarker', isSelected: true, format: {} },
formatHolder: { segmentType: 'SelectionMarker', isSelected: false, format: {} },
format: {},
},
],
Expand Down Expand Up @@ -355,7 +355,7 @@ describe('indent', () => {
},
],
blocks: [para1, para2, para3],
formatHolder: { segmentType: 'SelectionMarker', isSelected: true, format: {} },
formatHolder: { segmentType: 'SelectionMarker', isSelected: false, format: {} },
format: {},
},
],
Expand Down Expand Up @@ -397,7 +397,7 @@ describe('indent', () => {
},
],
blocks: [para2],
formatHolder: { segmentType: 'SelectionMarker', isSelected: true, format: {} },
formatHolder: { segmentType: 'SelectionMarker', isSelected: false, format: {} },
format: {},
},
listItem3,
Expand Down Expand Up @@ -450,7 +450,7 @@ describe('indent', () => {
},
],
blocks: [para1, para2],
formatHolder: { segmentType: 'SelectionMarker', isSelected: true, format: {} },
formatHolder: { segmentType: 'SelectionMarker', isSelected: false, format: {} },
format: {},
},
{
Expand All @@ -465,7 +465,7 @@ describe('indent', () => {
},
],
blocks: [para3],
formatHolder: { segmentType: 'SelectionMarker', isSelected: true, format: {} },
formatHolder: { segmentType: 'SelectionMarker', isSelected: false, format: {} },
format: {},
},
],
Expand Down Expand Up @@ -517,7 +517,7 @@ describe('indent', () => {
},
],
blocks: [para1, para2],
formatHolder: { segmentType: 'SelectionMarker', isSelected: true, format: {} },
formatHolder: { segmentType: 'SelectionMarker', isSelected: false, format: {} },
format: {},
},
{
Expand All @@ -533,7 +533,7 @@ describe('indent', () => {
},
],
blocks: [para3],
formatHolder: { segmentType: 'SelectionMarker', isSelected: true, format: {} },
formatHolder: { segmentType: 'SelectionMarker', isSelected: false, format: {} },
format: {},
},
],
Expand Down Expand Up @@ -586,7 +586,7 @@ describe('indent', () => {
},
],
blocks: [para1],
formatHolder: { segmentType: 'SelectionMarker', isSelected: true, format: {} },
formatHolder: { segmentType: 'SelectionMarker', isSelected: false, format: {} },
format: {},
},
{
Expand All @@ -602,7 +602,7 @@ describe('indent', () => {
},
],
blocks: [para2],
formatHolder: { segmentType: 'SelectionMarker', isSelected: true, format: {} },
formatHolder: { segmentType: 'SelectionMarker', isSelected: false, format: {} },
format: {},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ describe('toggleModelBlockQuote', () => {
levels: [],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down Expand Up @@ -693,7 +693,7 @@ describe('toggleModelBlockQuote', () => {
levels: [],
formatHolder: {
segmentType: 'SelectionMarker',
isSelected: true,
isSelected: false,
format: {},
},
format: {},
Expand Down
Loading

0 comments on commit b806329

Please sign in to comment.