Bug 525125 Ignore double-clicks in the blank space at the end of a paragraph r=IanN f=mkmelin

This commit is contained in:
Neil Rashbrook 2014-04-25 12:29:12 +01:00
Родитель 9ae517c0f2
Коммит 555043595f
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -1321,8 +1321,15 @@ function EditorDblClick(event)
// Only bring up properties if clicked on an element or selected link
var element;
try {
element = event.explicitOriginalTarget.QueryInterface(
if (gEditorDisplayMode == kDisplayModeAllTags)
element = event.explicitOriginalTarget.QueryInterface(
Components.interfaces.nsIDOMElement);
else
element = event.rangeParent.childNodes[event.rangeOffset];
// Don't fire for <br>, it counts as double-clicking text.
if (element.nodeName.toLowerCase() == 'br')
element = null;
} catch (e) {}
// We use "href" instead of "a" to not be fooled by named anchor