View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005751 | OXID eShop (all versions) | 3.2. HTML, CSS, JavaScript | public | 2014-05-07 11:59 | 2023-11-27 16:29 |
Reporter | FibreFoX | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.8.6 / 5.1.6 | ||||
Summary | 0005751: jQuery UI titlebar is removed on all items (oxmodalpopup.js) | ||||
Description | There is a flaw in the jquery-selector: $('div.ui-dialog-titlebar').remove(); This removes all titlebars, not just the one from the dialog. Its located in line 71 in this file: /out/azure/src/js/widgets/oxmodalpopup.js Removing ALL titlebars will break some wanted/needed ones from other instanciated dialoges, so this is affecting other themes. | ||||
Additional Information | Please fix thix callback: open: function(event, ui) { $('div.ui-dialog-titlebar').remove(); } Maybe something like this (havent tested that code): openDialog: function (target, options) { var modalDialog = $(target).dialog({ width : options.width, height : options.height, modal : options.modal, resizable : options.resizable, zIndex : options.zIndex, position : options.position, draggable : options.draggable, open: function(event, ui) { $('div.ui-dialog-titlebar', modalDialog).remove(); } }); } | ||||
Tags | No tags attached. | ||||
Theme | Azure | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
another option would be to remove them via CSS so there is no JS needed for it. EDIT: my current workaround is this by making a modified copy in my own theme: open: function(event, ui) { $('div.ui-dialog-titlebar', $(this).parent()).hide(); } |
|
Reminder sent to: FibreFoX Hi, Thanks for the issue, could you provide us more information about it? Could you please send us an example of the HTML code of the theme, where do you get this problem? Thanks in advance. |
|
just add another DIV with the class "ui-dialog-titlebar" to the page-template (it doesnt matter where it comes from), after opening the "more pictures"-dialog that div is gone, because the selector is just wrong (because it doesn't have the right scope). i know its hard to create a test-case, but please dont put this away, it is a bug. |
|
Reminder sent to: FibreFoX Hi, Thanks for the information, it really helped us to understand the problem better and we continue to investigate this issue. It would be nice to have a little bit more background about your particular case. Where and how do you use this class? Could you please provide more information about your use case? |
|
i am using jQueryUI myself in my project using .dialog(), which itself produces that titlebar, i need that titlebar so im confronted with that selector just removing all titlebars instead of just its own one. the fix is in one of my previous comments https://bugs.oxid-esales.com/view.php?id=5751#c9892 oh, to reproduce it: 1. open own dialog (which has titlebar) 2. close own dialog 3. open oxid-dialog (which removes ALL titlebars) 4. close oxid-dialog 5. re-open own dialog (here it happens, my titlebar is gone) note that i dont call dialog("destroy") i hope this helped a little, because i am using the framework if its already in the theme (i made azure the parent-theme) |
|
Azure was replaced by Apex. Apex uses Bootstrap 5 including its modal dialogues. Thus this kind of script does not longer exist within the theme. |