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

style attribute with expressions makes show directive invalid at the beginning #2178

Closed
Joylei opened this Issue Dec 25, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@Joylei
Contributor

Joylei commented Dec 25, 2016

Help us to manage our issues by answering the following:

  1. Describe your issue:

if there are expressions in style attribute, the show directive would not work at the beginning

    <child>
      <button onclick="{ toggle }">toggle</button>
      <p show="{ selected }" style="height:{ height };">should be hidden when inited</p>
      
      this.selected = false
      this.height = 'auto'
      this.toggle = ()=>{
        this.selected = !this.selected
      }
    </child>
  1. Can you reproduce the issue?

http://jsbin.com/yokegejoca/edit?html,output

  1. On which browser/OS does the issue appear?
    macOS 10.12.2; Chrome 55
  2. Which version of Riot does it affect?
    3.0.5
  3. How would you tag this issue?
  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance

@rsbondi rsbondi added the bug label Dec 25, 2016

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Jan 9, 2017

Member

I think it's related to #2158

Member

GianlucaGuarini commented Jan 9, 2017

I think it's related to #2158

@rsbondi

This comment has been minimized.

Show comment
Hide comment
@rsbondi

rsbondi Jan 9, 2017

Member

I believe style=whatever is overriding the display: none set by show, maybe if this was handled in update it would solve both issues

Member

rsbondi commented Jan 9, 2017

I believe style=whatever is overriding the display: none set by show, maybe if this was handled in update it would solve both issues

@Joylei

This comment has been minimized.

Show comment
Hide comment
@Joylei

Joylei Jan 11, 2017

Contributor

@rsbondi
agree.

Contributor

Joylei commented Jan 11, 2017

@rsbondi
agree.

@rsbondi

This comment has been minimized.

Show comment
Hide comment
@rsbondi
Member

rsbondi commented Jan 20, 2017

@rsbondi rsbondi added the duplicate label Jan 20, 2017

GianlucaGuarini added a commit that referenced this issue Mar 26, 2017

GianlucaGuarini added a commit that referenced this issue Mar 26, 2017

Merge branch 'master' into dev
* master:
  updated: fixed wrong text in the readme file
  updated: libraries sizes
  3.4.0
  added: support for style and class object attributes
  closes #2178
  updated: simplified the special expressions updates
  updated: cleaning up the update method
  updated: dbmon frames rendering strategy
  closes #2080
  closes #2103
  fixed: make sure that the riot version gets exported as string
  updated: dev dependencies
  Enable syntax highlighting of tag files
  updated: small optimization avoiding the shouldUpdate check for the anonymous tags
  updated: dev dependencies
  Delete a duplicate line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment