[ZBX-7242] Dragging an element in list changes it's width Created: 2013 Oct 30  Updated: 2017 May 30  Resolved: 2014 Feb 05

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.1.9
Fix Version/s: 2.2.0rc1, 2.2.0, 2.2.3rc1, 2.3.0

Type: Incident report Priority: Trivial
Reporter: Ivo Kurzemnieks Assignee: Ivo Kurzemnieks
Resolution: Fixed Votes: 0
Labels: draggable, frontend, slideshows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File draggable_element_width.png    

 Description   

In Configuration > Slide shows (or any other place where are draggable list elements), take an element and drag it. It will change to gray and change width. See attached image.



 Comments   
Comment by Alexander Vladishev [ 2013 Oct 30 ]

It works without problems in graphs form.

iivs I'm experiencing this also in graph forms.

Comment by richlv [ 2013 Oct 30 ]

it supposedly is/was jquery issue, at least i was told so - see 2.0.0 entry at https://www.zabbix.com/documentation/2.0/manual/installation/known_issues

Comment by Ivo Kurzemnieks [ 2013 Nov 04 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-7242

Comment by Pavels Jelisejevs (Inactive) [ 2013 Nov 05 ]

(1) The same problem exists for web scenario steps and icon mappings.

iivs RESOLVED in r39905

jelisejev CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2013 Nov 05 ]

TESTED.

Comment by Ivo Kurzemnieks [ 2013 Nov 05 ]

Fixed in pre-2.2.0rc1 (trunk) r39928

Comment by Aleksandrs Saveljevs [ 2013 Dec 11 ]

(2) Still happens in r40911 of 2.2 in Web scenario steps when fields have long values. May happen in other places, too.

iivs This happens in Chrome and Opera. The width of the whole box is different and a lot wider than in FF. In Chrome it seems streched, unlike in FF where it is fixed.
To reproduce this in web scenario steps, use long names in fields "URL" and "Required".
Slight movement also noticable on IE and Safari.

Also see similar problem graph item draggable elements. Box in FF is wider than in Chrome and items with long names can also cause glitches at first drag. Create item with long name, create item with small name. Add items to graph and drag item with small name. Item with long name which takes 2 lines, now jumps to 6 lines. Doesn't happen when item is dragged the second time, though.

Another problem: on Safari the draggable item actually goes all the way to right side out of the dotted box.

iivs I changed sizes of few cells so they are wider and look the same on different browsers.
I played around with manually setting width to table cells on drag, so they don't change, but I wasn't successfull.
On safari, I made a hack that prevents draggable element from moving outside of table.
Looks fine on FF on wide screen, but when changing browser width draggable elements still jump and change cell widths.
See changes I made in svn://svn.zabbix.com/branches/dev/ZBX-7242 r40919

Eduards REOPEN, Please use our variable SF instead of $.browser['safari'], also table resizing is broken in Chrome as discussed.

iivs
As far as I understand jQuery sortable is meant for lists <li>. It works terrible with table rows.

There were still many issues:

  • In graph edit form helper had hidden field mixed withing table cells causing table cells to jump on moving. This should be fixed now.
  • Table size changed when creating sortable table elements, so table width is now fixed upon loading page. This means that it will not be stretchable. Only when page is refreshed it will adjust table to new size. It's a minor drawback, but probably only way to fix table size changing.
  • On Safari draggable element moved all the way to right outside the table. Now draggable element is forced back to it's position, but in some tables position was required to adjust by several pixels (-2 or -4 not sure why is that).
  • When dragging element the invisible placeholder had no height. This should also be fixed now.
  • When browser window is resized, table cells randomly changed size.
  • In icon mapping draggable element jumped up by several pixels on moving. Adding line height for row seems to have fixed this.

Still there are known issues with jQuery sortable:

  • In grap edit form on smaller resolution when browser window is small and item names take 3 lines, first drag will somehow change column width by 1px. But on second drag, that will not happen.
    IE11 and safari one table cell is changed by 1px and not possible to fix that. Haven't seen how IE10 and less behave, though. So please test and give some feedback.
  • Since table width is now manully set, it is no longer stretching on window resize.

Anyway current fix is better that no fix at all.
RESOLVED in r42306

Eduards Agree, fix is good! Please review little changes r.42311
iivs Ok, thanks. CLOSED

Comment by Eduards Samersovs (Inactive) [ 2014 Feb 06 ]

Tested

Comment by Ivo Kurzemnieks [ 2014 Feb 06 ]

(3) I found 2 problems on IE8:

  • In slideshow list, table height was changing and helper object moved 4 pixes to right.
  • When dragging last element, footer jumped up like the whole table wrapper shrinked. Problem was with 'li.formrow'. And simply accessing it with no changes, seems to have fixed it. However, in slideshow and grap edit item list the whole table changes height due to placeholder border spacing. But no matter how you define (remove) borders, margins, padding or even move placeholder to different position, it still stays the same. Manually re-setting table height will have bad impact when adding and removing rows in table. Solution would be to recalculate following rows and move them manually, but it's time consuming and not worth it for one old browser.

I also made small changes during previous review.

RESOLVED in r42359

Eduards CLOSED

Comment by Ivo Kurzemnieks [ 2014 Feb 12 ]

Fixed in pre-2.2.3rc1 r42563 and pre-2.3.0 (trunk) r42565

Comment by richlv [ 2014 Feb 28 ]

this resulted in a regression : ZBX-7883 (when adding slides)

btw, it's not suggested to fix things for multiple versions in one issue, it is very hard to find out what was fixed where (this issue has 3 fixfor versions from one branch - 2.2.0rc1, 2.2.0 and 2.2.3rc1...)

Comment by Pavels Jelisejevs (Inactive) [ 2014 Mar 03 ]

Another regression: ZBX-7892.

Comment by richlv [ 2016 Jan 26 ]

similar problem reported as ZBX-10310

Generated at Sat Apr 20 02:03:00 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.