Skip to content
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

Not able to select whole paragraph with triple click when there is a table right after it #11130

Closed
Tracked by #13933
FilipTokarski opened this issue Jan 18, 2022 · 3 comments · Fixed by #15011
Closed
Tracked by #13933
Assignees
Labels
package:engine squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@FilipTokarski
Copy link
Member

FilipTokarski commented Jan 18, 2022

📝 Provide detailed reproduction steps (if any)

  1. Add some text in paragraph
  2. Add a table right after the paragraph
  3. Triple click on the paragraph to select it

✔️ Expected result

Whole paragraph is selected.

❌ Actual result

Paragraph is not selected. Selection collapses and jumps to the beginning of the paragraph.

Screencast

0_selection_after.mp4

📃 Other details

  • First affected CKEditor version: 27.0.0

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@FilipTokarski FilipTokarski added type:bug This issue reports a buggy (incorrect) behavior. package:engine squad:core Issue to be handled by the Core team. labels Jan 18, 2022
@martynawierzbicka martynawierzbicka added the support:2 An issue reported by a commercially licensed client. label Jul 12, 2022
@JasaNiklanovic
Copy link

Hi all, this is a serious bug in the core functionality and we would really appreciate this being solved asap.

@Witoso
Copy link
Member

Witoso commented Aug 21, 2023

Possible fix or approach: inline fillers around widgets.
Workaround: ugly triple click listener -> select the whole block.

@Witoso
Copy link
Member

Witoso commented Sep 11, 2023

Possible place to solve this as it's related to widgets:

if ( ( env.isSafari || env.isGecko ) && domEventData.domEvent.detail >= 3 ) {
const mapper = editor.editing.mapper;
const viewElement = element.is( 'attributeElement' ) ?
element.findAncestor( element => !element.is( 'attributeElement' ) )! : element;
const modelElement = mapper.toModelElement( viewElement )!;
domEventData.preventDefault();
this.editor.model.change( writer => {
writer.setSelection( modelElement, 'in' );
} );
}

@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Sep 11, 2023
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Sep 15, 2023
@illia-stv illia-stv self-assigned this Sep 18, 2023
niegowski added a commit that referenced this issue Oct 5, 2023
…hole-paragraph-with-triple-click

Fix (widget): Triple-click on a paragraph should select the whole paragraph even if a block widget follows (table, block image). Closes #11130.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Oct 5, 2023
@CKEditorBot CKEditorBot added this to the iteration 68 milestone Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants