#8324 closed bug (wontfix)
"CSS Scope" definistion not work with dialogClass
Reported by: | mostowfim | Owned by: | mostowfim |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.dialog | Version: | 1.8.20 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When defining a CSS Scope in "Advanced Theme Settings", the "dialogClass" option for Jquery dialog not work properly.
The workaround is to edit the css and remove ".ui-dialog" from the file. it is because the .ui-dialog and dialogClass is in the same level in the generated markup for dialog.
Change History (10)
comment:1 Changed 11 years ago by
Component: | ui.core → ui.dialog |
---|---|
Owner: | set to mostowfim |
Status: | new → pending |
comment:2 Changed 11 years ago by
Status: | pending → new |
---|
comment:3 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
ThemeRoller's scoping option and dialog's dialogClass option solve the same problem, but in different ways. There's not really a good way for us to handle this.
comment:4 Changed 11 years ago by
it is impossible to define "css scope" in ThemeRoller for applying to "dialog" because the dialog code is generate at the end of the page and there is no surrounding DIV for assigning the class.
the ugly workaround is to use below code: $('.ui-dialog').wrap('<div class="cssscope" />');
comment:5 Changed 11 years ago by
That's a fairly bad workaround, unless you're writing code to dynamically create and destroy the element on open and close. It also doesn't address scoping the overlay.
comment:7 Changed 11 years ago by
Why can't we fix this? A simple solution would be to add a 'scope' option to the widget. Then we can just wrap the dialog dom node with '<div class="${option.scope}">' after it has been appended to the end of document.body. I tested locally and works fine.
line 127 of jquery.ui.dialog.js:
++ .wrap('<div class="custom_scope">'),
comment:8 follow-up: 9 Changed 11 years ago by
Adding yet another wrapper is a potentially breaking change.
comment:9 Changed 11 years ago by
Replying to scott.gonzalez:
Adding yet another wrapper is a potentially breaking change.
Ok,any idea on what this could possibly break? Just for my information...
Only thing I can see now would be cleaning this wrapped div on destroy.
comment:10 Changed 11 years ago by
It would break any script that expects specific elements to be children of .dialog( "widget" )
.
This doesn't make any sense. The dialogClass is the scope.