#33578 closed defect (bug) (fixed)
Caret icon on widget title does not flip appropriately
Reported by: | sdavis2702 | Owned by: | chriscct7 |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Widgets | Keywords: | has-patch |
Focuses: | ui, javascript, administration | Cc: |
Description
On widgets.php, collapsed widgets already positioned in a sidebar area have a downward pointing caret icon. When you expand a widget, the caret switches to pointing up. Cool.
When you go to drag an expanded widget, it collapses automatically and remains collapsed even after it is "dropped." However, once collapsed, the caret continues to point up as if the widget was expanded.
Clicking the now collapsed widget expands it again and from there, the inconsistency is corrected. This patch corrects the caret behavior the moment you start to drag an expanded widget.
Note: There are plenty of sortable elements in core and I searched hard to find other elements that use the .ui-sortable-helper
class. The widgets are the only ones I found. If you know of others, please speak up.
Attachments (2)
Change History (16)
#2
@
9 years ago
- Focuses javascript added
- Keywords needs-patch added; has-patch removed
- Milestone changed from Awaiting Review to Future Release
- Version changed from trunk to 3.9
@sdavis2702: Thanks for the report. However, modifying jQuery UI's sortable.min.js
isn't going to be the right approach. Instead, the changes will need to be made to widgets.js
and potentially customize-widgets.js
.
#3
follow-up:
↓ 4
@
9 years ago
@westonruter I completely overlooked what file I was editing. Thanks. I'll shift focus to widgets.js
. Just so I know how this works, I shouldn't have to do any minimizing on my end right?
#4
in reply to:
↑ 3
@
9 years ago
Replying to sdavis2702:
Just so I know how this works, I shouldn't have to do any minimizing on my end right?
Yes, minified files should not be patched, our build tools take care of that.
There's a SCRIPT_DEBUG constant you can add to your wp-config.php
file to use non-minified files.
#7
@
9 years ago
What is the desired behavior when dropping an expanded widget? Toggle the caret and keep the widget collapsed, or return the widget to the open state?
#8
@
9 years ago
Attached patch toggles the caret and keeps the expanded widget closed/hidden when dropped. If we'd like it the other way around, let me know and I'll update the patch.
At the moment when the "ui-sortable-helper" class is added to the widget element that has an "open" class because it is expanded, I've removed the pre-existing "open" class.