-
Notifications
You must be signed in to change notification settings - Fork 13.5k
bug: ionic view-title is truncated. #3851
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
Comments
|
thanks delta98. modifying the style is not quite right. The title only wrapped when opening data the second time (without getting data from server). |
Hello, I see some issues on the portions below. There may be many ways of fixing it though. //$ionHeaderBar controller
self.updatePositions = function(titleEle, updateTitleLeft, updateTitleRight, buttonsLeft, buttonsRight, updateCss, showPreviousTitle) {
//...
ionic.requestAnimationFrame(function() {
if (titleEle && titleEle.offsetWidth + 10 < titleEle.scrollWidth) {
var minRight = buttonsRight + 5;
var testRight = $element[0].offsetWidth - titleLeft - self.titleTextWidth() - 20;
updateTitleRight = testRight < minRight ? minRight : testRight;
if (updateTitleRight !== titleRight) {
titleEle.style.right = updateTitleRight + 'px';
titleRight = updateTitleRight;
//...
self.titleTextWidth = function() {
if (!titleTextWidth) {
var bounds = ionic.DomUtil.getTextBounds(getEle(TITLE));
titleTextWidth = Math.min(bounds && bounds.width || 30);
}
return titleTextWidth;
}; In This leads to My current ugly workaround was to remove |
Thanks Will, |
Notice that there are always 2 ion header bars, one of which is always hidden (used for the transition). You need to run align in visible header bar (or in both). At first it took me a bit to notice that, since I was trying So, this is my ugly code to realign the bars (plus memoization removal)
|
Hello! Are you all still experiencing this issue? |
I'm yet to upgrade the project to a newer version of ionic to check it... Project currently on "stand-by". |
@wkrueger No Problem! |
Thanks for opening this issue! As this issue is a duplicate of #4661 (comment) i will be closing this issue but please feel free to move the conversation over there! Thanks again! |
Type: bug
Platform: android 4.2 webview
Hi,
My issue is:
I have a tab -> click on one item and it navigate to the detail page with a back button. (the navigation is done by routeprovider which pass an item ID).
The first time click to go to detail page. all data is loaded from breeze service.
However, if we go back & click on the same item, it simply get data from cache, which just take fraction of second. This is when the title issue arise:
At first time: i use ion-view view-title = {{}}
==> the title could not be display.
then i change to use:
ion-nav-title
{{}}
/ion-nav-title
==> title displayed on the second time, but the word is truncated like "View Ti..."
I tried to use $ionicNavBarDelegate.title(title); how ever it did not work, still being truncated.
I even try to add delay 1 second to the add title method, but still no clue how to fix it.
Anyone who go through the same problem?
Please help me to look into this
Thanks a lot.
The text was updated successfully, but these errors were encountered: