Fix URL navigation and text alignment issues in inlineEditor.
Review Request #5238 — Created Jan. 12, 2014 and submitted — Latest diff uploaded
Fix URL navigation and text alignment issues in inlineEditor.
inlineEditor's dragged text detection on
<a href="..."/>
elements would
fail to prevent the default action of navigating to the page after
opening the editor. Themouseup
was too late to block this. To fix this
properly, we now register aclick
event that directly opens the editor
and prevents the default action.There were also issues with sizing the editor on elements with a custom
text-align
property. It wasn't able to find the ideal bounds for the
editor, and would result in a pretty small text field just big enough
for the original text. It now works around this by setting the
text-align
property of the parent toleft
while doing the calcuations,
restoring it afterward.
Tested with a change I have in progress that was affected by both of these
bugs.