Kohei Nozaki's blog 

A quick workaround for list element issue of Roller5.1.0-SNAPSHOT mobile


Posted on Saturday May 17, 2014 at 03:36PM in Technology


I wrote a entry which uses list elements (ul, ol, li), and I got into some problem. so I leave this entry as a note of my solution.

I wrote some HTML as a content of a entry like this:

<ol>
  <li>element 1
  <li>element 2
  <ul>
    <li>nested element 1
    <li>nested element 2
  </ul>
</ol>

Then it showed in PC browsers as I expected like this:

List0

But, it showed in mobile version like this:

NewImage

all of list elements are disappeared. instead of list elements, the bottom of the entry became clickable. when I click the bottom, page transits to:

NewImage

I don't want this behavior, just want html lists to stay inline on the page. fortunately, I found a quick workaround of it that just copy template named "_day" of Standard to Mobile. 

  1. Go to blog settings
  2. Click design tab
  3. Click template
  4. Click "_day"
  5. Copy whole of template from "Standard"
  6. Click "Mobile" tab
  7. Paste the template
  8. Save

That's all. now mobile version looks like this:

NewImage



Comments:

Hi Kyle, we've looked into the example you gave at the top but for some reason can't duplicate it with latest Roller trunk. I noticed though you're making a ul element an immediate child of an ol in your example above, but that doesn't appear supported by the most recent HTML standard, i.e., that ul should be embedded within a parent li (with the top-level ol being the grandparent.) If that's the case, browser or theme behavior would be undefined. Still, we did notice another issue with text within <p>'s being truncated on the mobile theme, we'll be looking at that. Note we've recently added a Bootstrap-based responsive theme (called gaurav) to Roller trunk, providing another mobile option for you.

Posted by Glen Mazza on July 06, 2014 at 09:46 AM JST #


Hello Glen, thanks for the information, now I know I'm wrong at form of nested lists. hmm but still I don't know why you can't duplicate it, still I can see the problem easily when I reverted the blog template to default one. it doesn't matter if lists are nested or not (or in wrong nested form). anyway I would try the newer Roller in trunk later. thanks :)

Posted by kyle on July 06, 2014 at 01:46 PM JST #


Leave a Comment

HTML Syntax: NOT allowed