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

[WIP, don't merge] Fix #1804 and tweak #1595 #1865

Merged
merged 10 commits into from Jun 1, 2018

Conversation

Projects
None yet
4 participants
@pygy
Copy link
Member

pygy commented May 30, 2017

This fixes #1804 and tweaks #1595.

removeAttr() now mirrors setAttr(). values set to undefined or null are equivalent to a lack of value, except for select, where null

There are still possibly problematic corner cases with select.value, please don't merge this yet.

#1862 can be merged as is in the mean time if you want. I'll rebase this.

@isiahmeadows

This comment has been minimized.

Copy link
Collaborator

isiahmeadows commented May 31, 2017

FYI: #1862 is now merged.

@isiahmeadows

This comment has been minimized.

Copy link
Collaborator

isiahmeadows commented Aug 24, 2017

@pygy Ping...how close to ready is this to merge (another PR might be blocked on this)?

@porsager

This comment has been minimized.

Copy link
Contributor

porsager commented Sep 13, 2017

@pygy did you want to include the changes for style as suggested here: #1867 in this pull request?

@isiahmeadows

This comment has been minimized.

Copy link
Collaborator

isiahmeadows commented Sep 23, 2017

@pygy Would you mind redoing this PR since #1949 made several changes to event handling? (It should be more tenable to do now in that area.)

@pygy

This comment has been minimized.

Copy link
Member

pygy commented Apr 20, 2018

@vasilrimar reported issues where passing undefined doesn't remove the attr. I need to check if this patch covers his use case.

modified version of his repro

@pygy pygy added this to the 2.0.0 milestone Apr 24, 2018

@pygy pygy referenced this pull request May 30, 2018

Merged

Allow `xlink:href` to get removed, fix `option.value` in mock #1979

6 of 10 tasks complete

@pygy pygy force-pushed the pygy:fix-1804 branch from fa53a66 to 55ac30c May 31, 2018

@pygy pygy requested a review from tivac as a code owner May 31, 2018

@tivac

tivac approved these changes May 31, 2018

Copy link
Member

tivac left a comment

I can only give this a cursory look-through but it seems reasonable to me.

if(attrs.value === null) {
if (vnode.dom.selectedIndex !== -1) vnode.dom.value = null
} else {
/*eslint-disable no-implicit-coercion*/

This comment has been minimized.

@isiahmeadows

isiahmeadows Jun 1, 2018

Collaborator

Have you tried // eslint-disable-next-line no-implicit-coercion?

This comment has been minimized.

@pygy

pygy Jun 1, 2018

Member

Good point. I went for // eslint-disable-line since it is what we use the most, and normalized the way we use those directives in the code base.

@isiahmeadows
Copy link
Collaborator

isiahmeadows left a comment

Looks good to me. (I didn't want to abandon this patch.)

@pygy pygy force-pushed the pygy:fix-1804 branch from 55ac30c to 3669fdd Jun 1, 2018

@pygy

This comment has been minimized.

Copy link
Member

pygy commented Jun 1, 2018

Thanks @isiahmeadows the review is most welcome :-)

@pygy pygy merged commit 3f5cabc into MithrilJS:next Jun 1, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment