Roan Kattouw d6ae72eb9c Don't trigger namespaced events, it breaks VisualEditor
Code like $input.trigger( 'focus.ime' ); doesn't make any sense. Event
namespaces exist for binding and unbinding and are irrelevant when
triggering. However, there's a bug in the version of jQuery that we
use (1.8.3) that causes .trigger( 'focus.ime' ) to perform a native
focus and call natively bound focus handlers, but only call jQuery
event handlers bound to 'focus.ime', not handlers bound to 'focus'.
This bug is fixed in jQuery 1.9+. http://jsfiddle.net/WGy9h/3/
demonstrates this bug.

The way ULS broke VE with this went like this:
* VE initializes and creates two contentEditable divs, the
  pasteTarget and the documentNode. It then focuses the documentNode.
* ULS loads jQuery.ime
* Once jQuery.ime loads, it first calls .trigger( 'focus.ime' ) on
  the pasteTarget
* jQuery focuses the pasteTarget, which means a blur is emitted on the
  documentNode
* In response to this blur event, VE disables the SurfaceObserver
* jQuery.ime then calls .trigger( 'focus.ime' ) on the documentNode
* jQuery focuses the documentNode, but does not call VE's focus handler
  because it's bound to 'focus' rather than 'focus.ime'
* This means VE's SurfaceObserver is not reenabled
* If the user then focuses something else then focuses VE again, a
  native focus event fires and the SurfaceObserver does get reenabled

Change-Id: I7c590599df4cf62418403bc1d1dccfc3c6db5fd3
2013-09-27 16:34:19 -07:00
2013-07-07 15:35:31 +03:00
2013-09-26 23:08:53 -07:00
2013-04-23 16:03:28 +03:00
2012-06-12 14:13:34 +02:00
2013-04-29 10:05:02 +02:00
2013-05-22 09:41:20 +05:30
2012-07-13 15:16:06 -04:00
2012-07-18 15:29:17 +03:00
2013-08-22 08:37:54 +00:00
2013-08-19 04:40:08 +00:00

== Universal Language Selector ==
The Universal Language Selector extension (ULS) provides a flexible way to
configure and deliver language settings like interface language, fonts, and
input methods (keyboard mappings). This will allow users to type text in
different languages not directly supported by their keyboard, read content in a
script for which fonts are not available locally, or customise the language in
which menus are displayed.

For more information see:
 https://www.mediawiki.org/wiki/Universal_Language_Selector

== Copying ==
You may use any Project Milkshake product, including the Universal Language
Selector, under the terms of either the MIT License or the GNU General Public
License (GPL) Version 2 or later.

See GPL-LICENSE and MIT-LICENSE for details.

== Installation ==
For a very, very quick start add the following lines to LocalSettings.php of
your MediaWiki setup:

require_once "$IP/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php";

By default, ULS will appear at personal toolbar position. If you want ULS at
interlanguage position, add the following line:

$wgULSPosition = 'interlanguage';

== For Developers ==
The MediaWiki Universal Language Selector project uses jquery.uls:
 https://github.com/wikimedia/jquery.uls

Its development is at Wikimedia Github account. Any fixes to lib/ should happen
at Github. Follow the build instructions of jquery.uls to create jquery.uls.js.

More documenation is at:
 https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector

For reporting bugs, use 'UniversalLanguageSelector' component under
'MediaWiki extensions' product at:
 https://bugzilla.wikimedia.org
Languages
JavaScript 79.4%
HTML 11.9%
PHP 4.7%
Less 2.5%
CSS 1.4%
Other 0.1%