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

Already on GitHub? Sign in to your account

Toolbar anchors not styled as buttons #3455

Closed
MarkHamby opened this Issue Jan 18, 2012 · 8 comments

Comments

Projects
None yet
3 participants

JQM latest nightly version (Query Mobile Framework Git Build: SHA1: f2802bd <> Date: Tue Jan 17 21:46:28 2012 -0800). Problem does NOT exist in v1.0. Problem first noticed on nightly 2012-01-10.

Links in toolbars are not automatically styled as buttons. They are displayed as links. (This includes the auto-generated Back link/button when '$.mobile.page.prototype.options.addBackBtn = true;'. I verified the problem with the page below.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Test</title>
    <link rel="stylesheet" href="jquery.mobile.min.css" />
    <script type="text/javascript" src="jquery-1.6.4.min.js"></script>
    <script type="text/javascript" src="jquery.mobile.min.js"></script>
</head>
<body>
    <div id="TestPage" data-role="page"> 
        <div data-role="header" data-position="fixed">
            <h1>Test</h1>
            <a href="test1.html">Toolbar link</a>
        </div> 
        <div data-role="content">
            <p>This is some text.</p>
            <a href="test1.html">Normal link</a>
            <a href="test1.html" data-role="button">Button link</a>
        </div> 
    </div> 
</body>
</html>
Contributor

toddparker commented Jan 18, 2012

I updated your code block and created a jsbin to illustrate the issue:
http://jsbin.com/iruvok/2/
http://jsbin.com/iruvok/2/edit

Interestingly, if I switch to 1.7.1 with the same code, everything is fine:
http://jsbin.com/iruvok/3
http://jsbin.com/iruvok/3/edit

@toddparker Hmm, I reverted back fro JQ 1.6.4 from 1.7.0 due to problems (but I don't remember what they were now). I'll leave it to you to decide if this is really a problem or not. I suppose if the next JQM release specifies JQ 1.7.1+, then all is well. The Downloads page says JQ 1.6.4 even for Nightlies. You may want to change that.

Member

agcolom commented Jan 18, 2012

possibly related to this, the fixed header position seem to be calculated incorrectly when scrolling. Is this a general problem with headers or is my issue separate (I'll open a new issue if it is). To illustrate:

http://jsfiddle.net/agcolom/zYXLS/15/ (latest)

http://jsfiddle.net/agcolom/zYXLS/17/ (1.0)

scroll down slightly. You'll notice the header is repositioned, but instead of having it repositioned at the top of the displayed window, it is positioned at a posotion that seems to be something like the distance between the top of the document and the top of the new window from the top of the new window instead of from the top of the document. (sorry this is probably not very clear!). But try it, scroll a little bit, then scroll half-way and finally to the bottom...

Member

agcolom commented Jan 18, 2012

@toddparker please let me know whether I should open a separate issue.

Contributor

toddparker commented Jan 18, 2012

@agcolom We just landed the new fixed headers in master earlier today so we probably do have some bugs to tidy up. Making new issues for those would be great.

Member

agcolom commented Jan 18, 2012

@toddparker Done :-) (issue #3457)

Member

agcolom commented Jan 20, 2012

@toddparker I just checked your fiddles and all looks fine now...

Contributor

toddparker commented Jan 20, 2012

@agcolom - yep, both look right now so I think this can be closed.

@toddparker toddparker closed this Jan 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment