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

SVG要素のoffsetの値が不正(Forefox45ESR) #561

Open
miyoshi-t opened this issue May 26, 2016 · 1 comment
Open

SVG要素のoffsetの値が不正(Forefox45ESR) #561

miyoshi-t opened this issue May 26, 2016 · 1 comment
Assignees
Labels

Comments

@miyoshi-t
Copy link

Firefoxを38ESRから、45ESRにバージョンアップしたところ、
SVG要素でのoffsetX/offsetYプロパティの値が不正になったと思われるので報告致します。

【環境】
OS/ブラウザ: Windows10/Firefox38ESRと45ESR ※同じ端末
hifiveのバージョン: 1.2.2

【手順】
ほぼ同じ位置(目視)のSVG要素に対して
context.event.currentTarget.offsetXとoffsetYを取得したところ、
Firefox38ESR offsetX=606, offsetY=114.66668701171815
Forefox45ESR offsetX=265, offsetY=40
と差が出ました。

【参考情報】
検討外れなことを言っていたら申し訳ありませんが、
デバッグするとnormalizeEventObject関数内で
event.offsetXとevent.offsetYの値がFirefox38ESRではnullであったのが
Firefox45ESRではnullではなくなっていることが影響しているように見えます。

下記ページを拝見すると、firefoxではSVG要素もしくはその子要素は
offsetが計算されないことを前提にしていたのが、
45ESRではoffsetが入るようになったため、値が異なったのではと予想しています。
https://www.htmlhifive.com/conts/web/view/reference/event_normalize

@simdy simdy added the bug label Aug 4, 2016
@simdy simdy added this to the v1.2.4 milestone Aug 4, 2016
@simdy
Copy link
Member

simdy commented Aug 4, 2016

@simdy simdy removed this from the v1.3.2 milestone May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants