ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Column Move visual problems in Safari

Open JLLeitschuh opened this issue 11 years ago • 5 comments

This bug shows up in Safari http://ui-grid.info/docs/#/tutorial/217_column_moving The column doesn't show up under the cursor while moving it. Instead it appears very far to the left.

JLLeitschuh avatar Jun 18 '15 22:06 JLLeitschuh

Are you open to pull requests for this one? I'm currently affected by this and was going to look into trying to fix it.

vhalbwachs avatar Sep 02 '15 00:09 vhalbwachs

Movable columns has a special case for Safari, when I removed that case, it worked properly (with and without horizontal scrolling)

             ` if (gridUtil.detectBrowser() === 'safari') {
                //Correction for Safari getBoundingClientRect,
                //which does not correctly compute when there is an horizontal scroll
                elmLeft = $elm[0].offsetLeft + $elm[0].offsetWidth - $elm[0].getBoundingClientRect().width;
              }
              else {
                elmLeft = $elm[0].getBoundingClientRect().left;
              }`

dlgski avatar Dec 03 '15 18:12 dlgski

This bug was introduced here: #2895 I'm trying to determine what version of safari #2895 was trying to fix. It was definitely pre 7.0 as I have tested 7.0 on browserstack.

@Cadrach can you shed any light on this?

JLLeitschuh avatar Dec 03 '15 18:12 JLLeitschuh

I cannot remember the exact Safari version but it must have been 7 according to the release history: https://en.wikipedia.org/wiki/Safari_version_history.

It is possible that the behavior of getBoundingClientRect has been fixed in newer version though. I do not know which Safari version UIGrid supports, so I guess you can either remove the fix altogether, or condition it on Safari version.

Cadrach avatar Dec 04 '15 13:12 Cadrach

Okay, safari 7 doesn't seem to have that problem anymore. This hack is breaking it on other versions of safari so it should be reverted.

JLLeitschuh avatar Dec 15 '15 19:12 JLLeitschuh