Page MenuHomePhabricator

Dialog has no style applied and therefore is transparent (jQuery.UI) for RTL languages and monobook
Closed, ResolvedPublic

Description

Top left: Address bar; Center: The problem: Transparent dialog; Bottom-right: The executed js-code.

just did

$('<div>').dialog({title:"Hello!", buttons: { "Hello": function(){} }})

on Commons with ?uselang=fa&useskin=monobook and got a horrible result.

Tested also on de.wikipedia.org (needs loading jquery.ui explicitly before) with the same rendering.

Also tested with ?uselang=he&useskin=monobook showing the same problem.


Version: 1.19
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=38294
https://bugzilla.wikimedia.org/show_bug.cgi?id=44839

Attached:

layoutbug_rtl_monobook.png (584×984 px, 40 KB)

Details

Reference
bz35059

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:18 AM
bzimport set Reference to bz35059.
bzimport added a subscriber: Unknown Object (MLST).

mw.loader.using('jquery.ui.dialog', function() { $('<div>').dialog({title:"Hello!", buttons: { "Hello": function(){} }}) })

now also tested on http://www.mediawiki.org/wiki/Special:BlankPage?uselang=he&useskin=monobook

This means that the user *does not see* that there *is* a dialog. Did you have a look at the screenshot. The button with the "Hello!" has no style applied and the other Hello! should be in a tiltle bar. So there is -in fact- no dialog.

More information:

This problem appear in non-vector styles.

REPRODUCTION INSTRUCTIONS:

  • log in to any wikipedia
  • go to "preferences"
  • under "editing" make sure you have both "Enable enhanced editing toolbar" and "Enable dialogs for inserting links, tables and more" enabled
  • under "appearance", change your style to monobook or modern
  • under "preferrences => user profile => internationalization", change your language to an RTL language
  • open random article
  • press "edit" (well, the language equivalent - alt-e still works!)
  • open the "advanced" toolbar
  • press the "table" tool

note that the dialog box background is transparent.

this practically means that all styles except "vector" are handicapped, and can't use dialog boxes (well, they can, but it's close to impossible).

will be grateful for any workaround, e.g. some magic that can be put in "Mediawiki:monobook.css", "Mediawiki:modern.css", etc., or better yet, in "common.css".

peace.

(In reply to comment #3)

More information:

as soon as you add "uselang=he", the jquery.ui.theme.css either does not get to the client, or else loses the ui-widget-content background style.

unfortunately it is not easy to say much more than that, because using "debug=true" causes this annoying bug to go away, so i can't say if we just do not load jquery.ui.theme.css at all, or do we load a different version of it that does not contain the part with ".ui-widget-content".

peace.

(In reply to comment #4)
WORKAROUND:

add to common.css the following lines:

8<------------------------
.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
.ui-widget-content a { color: #222222/*{fcContent}*/; }
.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }
.ui-widget-header a { color: #222222/*{fcHeader}*/; }
8<---------------------------

this will solve the problem for non-vector users. this should not be the "fix", but it's a good idea to do on RTL wikis.

peace.

It seems to be related to jquery.ui.core.
After a little debugging: the background color of dialogs is implemented as part of jquery.ui.core.
You may compare the following resources:
http://bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&lang=en&modules=jquery.ui.core&skin=monobook&version=20120210T223051Z&*

http://bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&lang=he&modules=jquery.ui.core&skin=monobook&version=20120210T223051Z&*

And look for ui-widget-header class.

It is totaly unchecked, but MAYBE the resource:
http://en.wikipedia.org/w/resources-1.19/resources/jquery.ui/themes/default/jquery.ui.theme.css
is parsed by CSSJanus and "bgDefauLTRepeat" is replaced to "bgDefauRTLepeat", which causes some errors l8er?

No longer occurs.

It is totaly unchecked, but MAYBE the resource:
http://en.wikipedia.org/w/resources-1.19/resources/jquery.ui/themes/default/jquery.ui.theme.css
is parsed by CSSJanus and "bgDefauLTRepeat" is replaced to "bgDefauRTLepeat", which causes some errors l8er?

It's possible that this was issue. This bug was fixed a long time ago.

matmarex set Security to None.