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

dom.style.webkitTransform 返回空字符串 #532

Open
1 task done
tinys opened this issue Dec 8, 2023 · 0 comments
Open
1 task done

dom.style.webkitTransform 返回空字符串 #532

tinys opened this issue Dec 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@tinys
Copy link
Member

tinys commented Dec 8, 2023

Affected version

main

Flutter versions

3.13.9

No same issues found.

  • Yes, I search all issues but not found.

Steps to Reproduce

通过dom.style 获得不存在的样式属性,返回空字符串,应该返回undefined.和浏览器返回不一致。在判断浏览器是否支持标准属性的时候失败,最后设置样式失败。

Code example

var vendor = function () {
if (!inBrowser) {
return false;
}
var transformNames = {
webkit: 'webkitTransform',
Moz: 'MozTransform',
O: 'OTransform',
ms: 'msTransform',
standard: 'transform',
};
for (var key in transformNames) {
if (elementStyle[transformNames[key]] !== undefined) {
return key;
}
}

return false;
}();

// vernder = webkit

Expected results

webkit

Actual results

standard

@tinys tinys added the bug Something isn't working label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant