Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Prevent default browser actions on CTRL+K #155

Merged
merged 5 commits into from
Oct 2, 2017
Merged

Prevent default browser actions on CTRL+K #155

merged 5 commits into from
Oct 2, 2017

Conversation

ma2ciek
Copy link
Contributor

@ma2ciek ma2ciek commented Oct 2, 2017

Suggested merge commit message (convention)

Fix: Prevented default browser actions on CTRL+K. Closes ckeditor/ckeditor5#4811. Closes ckeditor/ckeditor5#4810.

tests/link.js Outdated
sinon.assert.calledWithExactly( spy, true );
} );

it( 'should show prevent default actions on Ctrl+K keystroke', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong desc

src/link.js Outdated
@@ -132,7 +132,11 @@ export default class Link extends Plugin {
const t = editor.t;

// Handle the `Ctrl+K` keystroke and show the panel.
editor.keystrokes.set( linkKeystroke, () => {
editor.keystrokes.set( linkKeystroke, ( keyEvtData, cancel ) => {
// Stop the event in the DOM to prevent default browser action.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more about preventing.

// Prevent focusing the search bar. #TICKETNUMBER

@Reinmar Reinmar merged commit 5360fce into master Oct 2, 2017
@Reinmar Reinmar deleted the t/153 branch October 2, 2017 13:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FF] Browser steals selection on CLTR+K [Edge] Browser opens another tab with cloned URL after CTRL+K
2 participants