rtvalluri
rtvalluri

Reputation: 587

Prevent page scroll on ui-grid field click

How to stop a page from scroll, when clicked on any of the row field in ui-grid

I have a page with ui-grid, and in that each row contains an anchor tag with some url value linked and target="_blank" to open in new tab like below

<a ng-href="www.google.com" target="_blank">Click here</a>

When I click on any of the link, new tab opens and then if I come back to previous tab, page is getting scrolled up

This causing only for the first time. If I click on any of the link in the grid for second time, everything working fine

Somebody please suggest me solution...thanks in advance

Upvotes: 1

Views: 165

Answers (1)

rtvalluri
rtvalluri

Reputation: 587

Grid height that causing the page to scroll is causing the issue. So, reducing the grid height solved the issue.

Upvotes: 1

Related Questions