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

Pagination styling is broken on IE9.

Open alexandery opened this issue 11 years ago • 20 comments

Pagination styling is broken on IE9. Here are the screenshots from IE9 and FF of one of the tutorial pages:

IE9: pagination ie9

FF: pagination ff

alexandery avatar Jan 14 '15 21:01 alexandery

One solution I've found is:

.ui-grid-pager-panel {
    position:relative;
    display: inline-block;
}

.ui-grid-pager-max-pages-number {
    vertical-align: top;
}

the ui-grid-pager-max-pages-number vertical position might not be the best but because of the line-height of the footer it's difficult to position it properly. If the line height is set to 1 then vertical-align: middle would work fine.

Hope this helps

wallsoferico avatar Jan 16 '15 14:01 wallsoferico

Is this still happening? I saw a different IE pagination issue that seemed to suggest it was slightly overlaying the scrollbar, which implies this isn't happening any more.

PaulL1 avatar Mar 28 '15 22:03 PaulL1

Can confirm this issue is still happening on IE9.

image

zhusulai avatar Apr 06 '15 13:04 zhusulai

Hi,

Not only IE9 but also for IE11. You can check http://ui-grid.info/docs/#/tutorial/214_pagination clipboard01

hikalkan avatar Jul 26 '15 17:07 hikalkan

This is an issue that is not exclusive to IE. Seems very inconsistent and hard to reproduce.

JLLeitschuh avatar Jul 27 '15 16:07 JLLeitschuh

Interesting.. but it always happens when I try :)

hikalkan avatar Jul 27 '15 16:07 hikalkan

Anyone know anything more about a fix for pagination overlapping the grid? I need to support IE and I'm unsure how to fix this.

dalin92 avatar Aug 17 '15 23:08 dalin92

@JLLeitschuh @dalin92 @hikalkan The reason why this is happening is because the adjustment values are different in IE when compared to chrome and firefox. The adjustment is subtracted from the total height to get a final viewport height.

e.ownerDocument.defaultView.getComputedStyle(e, null)

The above statement is used in the getStyles function which returns a different height in IE when compared to other browsers. The reason being that the height in IE is excluding padding whereas the height in chrome and firefox is including padding.

Possible fixes:

Option 1: We could change the box-sizing property to content-box and let the code handle it,

File: Pagination.less

.ui-grid-pager-panel {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding-top: 3px;
    padding-bottom: 3px;
    box-sizing: content-box;
}

File: pagination.js

uiGridCtrl.grid.renderContainers.body.registerViewportAdjuster(function (adjustment) {
   adjustment.height = adjustment.height - gridUtil.elementHeight($elm, "padding");
   return adjustment;
});

Once we change to content-box, the padding will be ignored when the height is computed which brings all browsers on the same playing field. Once we pass option "padding" to the elementHeight function, it reduces the height by the padding (6px) which aligns the controls correctly (IE10+).

PR #4616

Option 2: We can add a min-height property of 32px to the .ui-grid-pager-panel class and then add another function to the gridutils to pull the min-height property for the panel and reduce the height of the viewport by the min-height which should fix this issue. I dont have a PR for this but let me know if you need one. This option is more invasive than option 1.

ashwin027 avatar Nov 02 '15 05:11 ashwin027

+1 for this issue - happens consistently for me

SoundLogic avatar Nov 05 '15 18:11 SoundLogic

+1 for this issue - happens consistently

anitapillai avatar Nov 17 '15 15:11 anitapillai

Same problem. Chrome is OK but Firefox not

TeChn4K avatar Nov 23 '15 09:11 TeChn4K

I use another temp fix. My needs : hidden scrollbars, adaptive height and pagination.

ui-grid js conf :

...
enableHorizontalScrollbar: 0,
enableVerticalScrollbar: 0,
...

css overload

.ui-grid, .ui-grid-viewport {
  height: auto !important;
}

.ui-grid-pager-panel {
   position: relative;
   left: auto;
   bottom: auto;
   padding-top: 0;
   padding-bottom: 0;
}

.ui-grid-pager-container, .ui-grid-pager-count-container {
 margin-top: 10px;
}

TeChn4K avatar Nov 23 '15 11:11 TeChn4K

I have issues with IE11 and FireFox (FireFox looks way worse). Is there a workaround?

jodibean avatar Jan 13 '16 21:01 jodibean

Only for IE you can: .ui-grid { position: relative; } and .ui-grid-pager-panel { position: absolute; left: 0; bottom: -3px; width: 100%; padding-top: 3px; padding-bottom: 3px; box-sizing: content-box; }

For me this solution looks good (screens below) screen (IE11) screen2 (IE9)

marcindopart avatar Apr 20 '16 10:04 marcindopart

The above solution worked for me. You can also follow the below link.

[http://dp1981.blogspot.com/2016/07/ui-grid-ie9-pagination-issue.html]

dipankarpaul avatar Jul 25 '16 14:07 dipankarpaul

Having the same issue in IE9 which the position:absolute + bottom:-30px does not work. Have to apply the below css:

.ui-grid .ui-grid-pager-panel{
  bottom: -5px;
  position: relative;
}

vcfvct avatar Mar 24 '17 18:03 vcfvct

Removed IE9 support.

mportuga avatar Mar 13 '18 03:03 mportuga

@mportuga When you make a release with that change. Remember that according to Semver, that's a major version breaking change and you should rev the major version number.

JLLeitschuh avatar Mar 15 '18 16:03 JLLeitschuh

@JLLeitschuh So, the reason for not making it a major version at the moment is because 5.0.0 is currently planned to be the angular 5 release. So I will unfortunately not be following Semver conventions correctly for the near future. However, I did call it out in the Changelog, if that makes it a little better.

mportuga avatar Apr 02 '18 12:04 mportuga

Fair enough.

JLLeitschuh avatar Apr 17 '18 22:04 JLLeitschuh