Skip to content
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

fixes for Firefox #223

Merged
merged 1 commit into from
Dec 19, 2018
Merged

fixes for Firefox #223

merged 1 commit into from
Dec 19, 2018

Conversation

fivetanley
Copy link
Contributor

@fivetanley fivetanley commented Dec 19, 2018

  • SVGs don't have height in Firefox, so we have to fallback to the
    parentElement's height in order to calculate scale correctly. When the
    drag handler was used on a .handle element that was an SVG, the
    value of scale was always zero. Now it is the correct value (usually
    1).
  • Use the transitionend event to wait for events to finish. This prevents race conditions versus trying to extract the time from the styles. In chrome,
    these animations were scheduled in such a way that the dom elements were
    technically in the right order but visually inaccurate if we slowed the
    transitions down. In Firefox, the smoke tests failed due to the elements
    being out of order. In addition to using the transitionend event
    (which is supported by all browsers we
    support(https://developer.mozilla.org/en-US/docs/Web/Events/transitionend#Browser_compatibility),
    when DEBUG mode is active (e.g. development or test builds, not
    production builds`, we emit a custom event on the document and use a
    custom waiter to prevent Ember from advancing the test suite too fast
    before the transitions are done (the transforms need to finish so that
    the elements are in the correct order in the dom).
  • Add Firefox to our .travis.yml and testem.js files so that we test
    against Firefox in CI.

- SVGs don't have height in Firefox, so we have to fallback to the
parentElement's height in order to calculate scale correctly. When the
`drag` handler was used on a `.handle` element that was an SVG, the
value of `scale` was always zero. Now it is the correct value (usually
1).
- Use the `transitionend` event to wait for events to finish. In chrome,
these animations were scheduled in such a way that the dom elements were
technically in the right order but visually inaccurate if we slowed the
transitions down. In Firefox, the smoke tests failed due to the elements
being out of order. In addition to using the `transitionend` event
(which is supported by all browsers we
support(https://developer.mozilla.org/en-US/docs/Web/Events/transitionend#Browser_compatibility),
when `DEBUG` mode is active (e.g. development or test builds, not
production builds`, we emit a custom event on the document and use a
custom waiter to prevent Ember from advancing the test suite too fast
before the transitions are done (the transforms need to finish so that
the elements are in the correct order in the dom).
- Add Firefox to our .travis.yml and testem.js files so that we test
against Firefox in CI.
@jgwhite jgwhite merged commit 3d85276 into master Dec 19, 2018
@jgwhite jgwhite deleted the firefox branch December 19, 2018 22:40
@jgwhite
Copy link
Contributor

jgwhite commented Jan 4, 2019

Released in 1.12.4

@BnitoBzh
Copy link
Contributor

BnitoBzh commented Feb 5, 2019

Breaks all drag & drop usages on my applications .. (tested on Safari, Chrome and Firefox) ...
All worked fine before 1.12.4 ....
Now after dragging an element, the onUpdate action is not called and the dragged element is not draggable anymore ...

@jgwhite
Copy link
Contributor

jgwhite commented Feb 5, 2019

@BnitoBzh very sorry to hear that. Are you able to give us any code snippets that will help us figure out what happened here? Are you OK to downgrade for the time being?

@BnitoBzh
Copy link
Contributor

BnitoBzh commented Feb 5, 2019

@jgwhite I have no code snippet, i am using ember-sortable in its basic way, (readme example).
I have downgraded and blocked ember-sortable to its version 1.12.3.
I have not a lot of time now to debug this issue, sorry

@jgwhite
Copy link
Contributor

jgwhite commented Feb 5, 2019

@BnitoBzh no problem. We’ll look into it and make a note on this thread when a fix lands.

@fivetanley
Copy link
Contributor Author

@BnitoBzh Can you open this as a new issue? Thanks

@apellerano-pw
Copy link

Am having the same bug where transitionend never fires, I'll open an issue with what I know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants