Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

fix(templating): correctly handle tables #1903

Merged
merged 3 commits into from
Nov 6, 2017

Conversation

fjl5
Copy link
Contributor

@fjl5 fjl5 commented Aug 17, 2017

Brief description of the changes

When adding new rows to a table, the existing mechanism of storing the HTML of a row in variable breaks at least on firefox: When parsing this HTML fragment and creating DOM elements, the browser will ignore tags it does not expect without proper parent tags. Appending this modified DOM branch to the table results in broken DOM structure. Cloning the DOM branch of a row and appending this clone to the table works just fine.

Fixes #1246

What browsers and operating systems have you tested these changes on?

Firefox on Ubuntu

Have you written unit tests? If not, explain why.

Yes

fjl5 and others added 3 commits August 17, 2017 09:30
When adding new rows to a table, the existing mechanism of storing the HTML of
a row in variable breaks at least on firefox: When parsing this HTML fragment
and creating DOM elements, the browser will ignore tags it does not expect
without proper parent tags. Appending this modified DOM branch to the table
results in broken DOM structure. Cloning the DOM branch of a row and appending
this clone to the table works just fine.

Fixes FineUploader#1246
Replace tabs with spaces.
Copy link
Member

@rnicholus rnicholus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Love to see the tests.

@rnicholus rnicholus merged commit 0bfae7b into FineUploader:develop Nov 6, 2017
@rnicholus rnicholus added this to the 5.15.1 milestone Nov 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants