Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grids with width in % in IE are broken #3095

Closed
HristoP96 opened this issue Nov 21, 2018 · 1 comment
Closed

Grids with width in % in IE are broken #3095

HristoP96 opened this issue Nov 21, 2018 · 1 comment
Assignees
Labels
browser: IE-11 Issues specific to the MS IE11 browser 🐛 bug Any issue that describes a bug grid: general status: not-to-fix version: 6.2.x version: 7.0.x

Comments

@HristoP96
Copy link

HristoP96 commented Nov 21, 2018

Description

Grids with width in % do not render properly in IE because of these code snippets:

   const computed = this.document.defaultView.getComputedStyle(this.nativeElement);

   if (this._width && this._width.indexOf('%') !== -1) {
      /* width in %*/    
        const width = parseInt(computed.getPropertyValue('width'), 10);

The problem is that in IE computed.getPropertyValue('width') returns 100% if the grid width is set 100% and when you calculate const width = parseInt(computed.getPropertyValue('width'), 10); it return 100 which sets the grids width to 100px.

capture

Steps to reproduce

Open this link in IE:
https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid.html

Result

This grid is broken:

broken-grid

Expected result

The grid to render properly;

grid not broken

@HristoP96 HristoP96 added 🐛 bug Any issue that describes a bug 🆕 status: new grid: general browser: IE-11 Issues specific to the MS IE11 browser version: 7.0.x labels Nov 21, 2018
@HristoP96 HristoP96 changed the title Grids with width in % in IE are broken Grids with width in % in IE are broken(master) Nov 21, 2018
@HristoP96 HristoP96 changed the title Grids with width in % in IE are broken(master) Grids with width in % in IE are broken Nov 22, 2018
@zdrawku zdrawku added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🆕 status: new labels Nov 22, 2018
kdinev pushed a commit that referenced this issue Nov 27, 2018
…Width in IE11(master) (#3097)

* fix(grid): Calculating grid's width  based on its offsetWidth in IE11. #3095

* fix(igxOverlay): take element, not child, in get overlay info, #3131

* test(igxOverlay): add tests for rendering components, #3131

* test(igxOverlay): fix failing tests, call CDR after component attached, #3131

* docs(*): update CHANGELOG.md with 6.2.1 changes

(cherry picked from commit 54e1431)

# Conflicts:
#	CHANGELOG.md

* docs(*): Add dark theme to 7.0.0 changelog
@zdrawku zdrawku added 🛠️ status: in-development Issues and PRs with active development on them and removed ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. labels Dec 10, 2018
@HristoP96 HristoP96 added status: not-to-fix and removed 🛠️ status: in-development Issues and PRs with active development on them labels Jan 21, 2019
@HristoP96
Copy link
Author

The rendering issues were caused due to not enabling the Autoprefixer plugin to work with grid layouts.

A decision was made that this enabling will be done only on customer side (if they want to use our controls in IE 11).

This pull request provides a documentation on how and why the customers should enable the autoprefixer for grid layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser: IE-11 Issues specific to the MS IE11 browser 🐛 bug Any issue that describes a bug grid: general status: not-to-fix version: 6.2.x version: 7.0.x
Projects
None yet
Development

No branches or pull requests

2 participants