Open Bug 895510 Opened 11 years ago Updated 2 years ago

execCommand("createLink") with no selection does not insert a text

Categories

(Core :: DOM: Editor, defect)

22 Branch
x86
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: cwolfe, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36

Steps to reproduce:

An example site
http://www-archive.mozilla.org/editor/midasdemo/
go to create link, enter url

This is not my code, but it shows that execCommand is not working for createlink


Actual results:

nothing shows up, on chrome we get a link


Expected results:

link should have been inserted into text feild
Component: Untriaged → Editor
Product: Firefox → Core
I am experiencing same issue on Firefox 25 on Ubuntu.
+1. I'm seeing this on your demo page in FF 31 on my mac. I've seen this issue in both the Mozilla demo, as well as some other rich text editing platforms. Both work in Chrome.

Note: Create link works if you enter text, select it, and then add a link. It's only when adding a link without selecting text first.

Mozilla link:
http://www-archive.mozilla.org/editor/midasdemo/
Yes, it's weird, it seems it needs to lose somehow focus before working

anyway this is easily done with insertHTML
Attached file bug895510.html

Chrome behaves here in an undocumented and inconsistent way. It should really about adding anchor to existing text, not creating a new one.

Edit: Filed https://bugs.chromium.org/p/chromium/issues/detail?id=1089725

Summary: createlink execcommand not working → execCommand("createLink") with no selection does not insert a text
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: