-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Column menu positioning bug in a 'horizontal scrolled'-grid in Firefox #5396
Comments
Thanks @PhilippHToner! Your quick-dirty-fix fixed my problem. Here is how I use it (this way you don't have to change the ui-grid source code);
|
Firefox appears to be implementing It looks like if an element has |
Menu width calculation was removed in angular-ui#6588. Menu width needs to be calculated in order to properly position the menu (if there is not enough room to the left of the column). repositionMenu is now always called in the 'menu-shown' event listener to ensure the width can be properly calculated. The style attribute is removed from $elm in the 'menu-hidden' event listener to prevent the menu from appearing to slide from the left or right when opening another column menu while one is already open. Menu animation speed was changed in angular-ui#6588 to have different add/remove speeds. 0.04s has been chosen as a happy medium, and the $timeout duration has been changed to reflect the new transition duration (to reduce delay when hiding the menu). `position: relative` has been removed from .ui-grid-header-cell-row to ensure consistent calculation of offsetParent across browsers. Fixes angular-ui#5396, angular-ui#5990, angular-ui#6085.
Menu width calculation was removed in angular-ui#6588. Menu width needs to be calculated in order to properly position the menu (if there is not enough room to the left of the column). repositionMenu is now always called in the 'menu-shown' event listener to ensure the width can be properly calculated. The style attribute is removed from $elm in the 'menu-hidden' event listener to prevent the menu from appearing to slide from the left or right when opening another column menu while one is already open. Menu animation speed was changed in angular-ui#6588 to have different add/remove speeds. 0.04s has been chosen as a happy medium, and the $timeout duration has been changed to reflect the new transition duration (to reduce delay when hiding the menu). `position: relative` has been removed from .ui-grid-header-cell-row to ensure consistent calculation of offsetParent across browsers. Fixes angular-ui#5396, angular-ui#5990, angular-ui#6085.
Menu width calculation was removed in #6588. Menu width needs to be calculated in order to properly position the menu (if there is not enough room to the left of the column). repositionMenu is now always called in the 'menu-shown' event listener to ensure the width can be properly calculated. The style attribute is removed from $elm in the 'menu-hidden' event listener to prevent the menu from appearing to slide from the left or right when opening another column menu while one is already open. Menu animation speed was changed in #6588 to have different add/remove speeds. 0.04s has been chosen as a happy medium, and the $timeout duration has been changed to reflect the new transition duration (to reduce delay when hiding the menu). `position: relative` has been removed from .ui-grid-header-cell-row to ensure consistent calculation of offsetParent across browsers. Fixes #5396, #5990, #6085.
Thank you andresbiso for your comment. This problem still existed for us in Firefox. I was able to implement your fix with 1 minor tweak: I had to change the module reference to 'ui.grid' |
Reproduce:
Analysis:
In ui-grid there is a
uiGridColumnMenuService::getColumnElementPosition
-Method, returning a to chrome different value ofpositionData.parentLeft
which is zero in Firefox.Possible Conclusion:
Firefox is using a different implementation of
offsetParent
?Quick-(dirty)-fix:
As this is just a hack, I'm no going to provide a pull-request for this.
The text was updated successfully, but these errors were encountered: