HomePhabricator

Refactor editor placeholder translation setup
a0a89dbe0557Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Refactor editor placeholder translation setup

Instead of waiting for one second before updating the placeholder, only
call updatePlaceholder after the new translations have been loaded.

Also call updatePlaceholder on page initialization, making the
equivalent code in editor initialization unnecessary.

Get the DOM elements to update from the editor’s CodeMirror variable, in
case there’s more than one editor on the page.

Set the CodeMirror placeholder option in addition to directly updating
the DOM element, just in case CodeMirror reinitializes the DOM element.

Bug: T168655
Bug: T207059
Change-Id: Ib3857b7f8f740ddf6bf2cab72dc602018572f86b

Details

Provenance
Lucas_Werkmeister_WMDEAuthored on Nov 7 2018, 1:07 PM
Parents
rWDQGbdf870d456b8: Merge "Make placholder update on language change"
Branches
Unknown
Tags
Unknown
ChangeId
Ib3857b7f8f740ddf6bf2cab72dc602018572f86b