This is done by setting renderHtmlAttributes to false, for both block
and inline transclusions.
Bug: 49925
Change-Id: I975cf1de3b273a5189e6edf7db937c4388fa4fbe
Objectives:
* Use template data for templates added to a transclusion using
the list controls
* Cache template data between different instances of the dialog
* Allow placeholders to be replaced with templates asynchronously
* Save http request and abort pending requests on close
Also:
* Fix breakage of (unused) method getParameterAliases
(dont delete aliases)
* Remove unused method getTemplateSpec.
Bug: 49778
Change-Id: I391e51cb900ef5560455d6f3d4d2a8b99ed2b034
They no longer overlap (except for 3 lines of code). The
double switch case for save/diff 90% of the body being if-save
and elseif-diff doesn't make sense.
Change-Id: Ic6f014393e72901bb5ab4449d946d94b87429e52
When the cursor is programmatically moved, as we need to do
from time to time, Firefox's internal reference for the appropriate
cursor location on nearby lines is maintained, creating an
unexpected experience.
The fix is to wiggle the selection. This tricks Firefox into thinking
that it adjusted the selection natively.
Bug: 48289
Change-Id: I75e7e4467ec1c3faf344709886b9be5b1423cd3e
Rational is that you wouldn't want to highlight something that is not
visible. And, obtaining offsets for hidden slugs in this case does not
return correct values.
Bug: 49818
Change-Id: Ic2818423c26f5bbb2c056c3c94740d822be4f1b8
Ed & Roan:
Disable editing of references of which we are unable to find the
source (e.g. <ref name="x"> without a target, or when the target is
currently nested in something we don't yet process such as inside a
<references> block or a template).
Timo:
Improve UI to not be a regular focusable node where the inspector just
won't show up but add a not-allowed cursor and explanatory tooltip.
James:
Fix messages to refer to VisualEditor instead of "the" VisualEditor.
Change-Id: Ib2bca092ce13c9187fa8b27ad6a6404cae02aea2
The sanity check converts the linear model back to DOM, then
compares this DOM to the original DOM and rejects the deferred
if they are not equal.
The DOM creation has to be done synchronously (before we unlock
the surface), but the actual comparsion can be (and is) done
asynchronously.
To make the UI flow of the save dialog easier we just keep the
save button on the toolbar itself disabled until the sanity
check is done. Though this should finish before the user starts
editing the document (let alone start saving), we do add a class
to the button to indicate a progress cursor.
To simulate a slow sanity check, set the setTimeout in
startSanityCheck to 5000, load VE, make a change, hover the
button, and see it change from disabled + progress-cursor to
enabled after 5 seconds.
To simulate the sanity check failing, change !== to === in
the first "if" in startSanityCheck.
Bug: 47521
Bug: 50067
Change-Id: I04f71fe8e00c6257fbc953cc9de3323e24709b0f
Objectives:
* Split reference dialog (at least for now) an edit and an insert dialog
* Add reference search widget for selecting an existing source, or
choosing to add a new one
* Abstract reference names, don't allow editing them and generate them
when needed
* When editing groups, move the internal item and update all references
to it
* Resolve name conflicts when moving a reference to a new group by
generating a new list key
Bonus:
* Add getNodeGroups method to internal list
* Add getUniqueListKey method to internal list
* Add destroy functionality to ce.node to release events and references
Bug: 49733
Change-Id: Ib244ff6ad9b4cee1decfd9b9e1d3d4e9cdcfb78c
Objectives:
* Make protected CE nodes only add shields when attached to a surface
* Remove hack in reference list node used to work around this issue
Change-Id: I48d4478558b49037b80b6131e1b2e01dc4f9ec47
* Port the class preservation logic from BlockImage to InlineImage
* Add preservation for unrecognized classes
* Add the logic for collapsing spaces in the class attribute in more
places
Change-Id: I26faad7e00ab2f0a0f5d076552e56b32c692ae74
When you selected the "edit" link by tabbing, the links would expand.
In Chrome, you could then tab to the "edit source" link, but in Firefox,
the links would just contract back and you couldn't reach "edit source".
This happened because in Chrome, the "edit source" link is already
considered to be focused when the blur event happens on the "edit" link.
But in Firefox, this is not the case: the blur fires first, and only
after that does Firefox determine what to focus next.
Fixed by waiting 100ms to contract after blur, just like we do on
mouseleave.
Change-Id: I9a38b629ca5e580003d82a3dca8dbf7564486fa0
After a spirited discussion, localOverlay is getting some children.
* localOverlayBlockers - UI elements that are meant to prevent
interaction with the element. This includes Phantoms and
Highlights.
*localOverlayControls - UI elements that are meant to be
interacted with in order to modify the element. This includes
resize handles and drag marker.
*localOverlayMenus - UI elements that should always position
above all other controls. This includes the context menu.
Bug: 50159
Change-Id: Ic69c2ad275389a31c9fbaf47f3665dcdbb7ac2af
Objectives:
* Make options unable to be selected or highlighted when disabled
* Add default styles for selected state
* Fix line-height for option labels
* Use default cursor when field is disabled
Change-Id: I8a535cd6b259b092c2abce27ddb10882cdde6cf5
Objective:
* Make the escape key close dialogs, like pressing the X button
* Auto-focus the iframe on window open
Bonus:
* Add ESCAPE and SHIFT to ve.Keys and use instead of hardcoding numbers
* Use ve.Keys in some other places too
Bug: 49809
Change-Id: Ibf1fce5e24efcd83d9e1465c3cdaac24ff3fb45d
Omitting the offset causes insertMeta() to automatically use the
end offset, so we don't need to compute it in two places. The two
computations were also slightly different.
Change-Id: I55543fdd113a6a986899c093733191df948acb2e
The save dialog has z-index: 3;, which succeeds in overlaying it on the
toolbar in its normal position, but fails once the toolbar starts
floating, because the floating toolbar has z-index: 100;
In practice this meant that if you were scrolled down and the toolbar
was floating, you could open the save dialog just fine, but you
couldn't close it because its controls were below rather than on top of
the toolbar.
Hacked around this by detecting the floating-ness in the toolbarPosition
handler and setting a class on the toolbar tracker accordingly.
There may be a more elegant way to fix this; an actual UI engineer
should figure that out, not me :)
Bug: 50324
Change-Id: I8c6ab1026705d00baa20f115255d0d7e74ee72bf
This ensures that attributes and properties that are supposed to be
stripped on copypaste are actually stripped.
Bug: 49307
Change-Id: I8c90f4a0b33acba6eea3180cc077f8dc440e6e7b