mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Feature: ctrl click on links allowed in preview
This commit is contained in:
parent
8fc1289172
commit
ce9fa724b9
@ -12,6 +12,7 @@ import { siteDir } from 'discourse/lib/text-direction';
|
||||
import { determinePostReplaceSelection, clipboardData } from 'discourse/lib/utilities';
|
||||
import toMarkdown from 'discourse/lib/to-markdown';
|
||||
import deprecated from 'discourse-common/lib/deprecated';
|
||||
import { wantsNewWindow } from 'discourse/lib/intercept-click';
|
||||
|
||||
// Our head can be a static string or a function that returns a string
|
||||
// based on input (like for numbered lists).
|
||||
@ -258,6 +259,7 @@ export default Ember.Component.extend({
|
||||
|
||||
// disable clicking on links in the preview
|
||||
this.$('.d-editor-preview').on('click.preview', e => {
|
||||
if (wantsNewWindow(e)) { return; }
|
||||
if ($(e.target).is("a")) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user