Fix URL navigation and text alignment issues in inlineEditor.
Review Request #5238 — Created Jan. 12, 2014 and submitted
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.
Description | From | Last Updated |
---|---|---|
Can you elaborate on the motivation behind this for me? This change prevents users from clicking on a link in … |
TG tgerdes |
-
I don't know if it's appropriate for me to comment on an old review like this or if I should do this in the context of a bug, but I'll start here for now.
-
Can you elaborate on the motivation behind this for me? This change prevents users from clicking on a link in the Description or Testing Done sections and having it open in a new tab.
For example, in https://reviews.reviewboard.org/r/5465/ I posted a few links in testing done and clicking them (as a user who has no permission to edit my review request, which includes myself since it's in the closed state) causes absolutely nothing to happen now. -- They look like links but no longer behave like links.
Is that your expected behavior now?