Open
Description
Version
2.6.10
Reproduction link
https://codepen.io/anon/pen/XLyPJe
Steps to reproduce
environment:
- qqBrowser 4.4
- android 4.2.2
- userAgent Mozilla/5.0 (Linux; U; Android 4.2.2; zh-cn; Coolpad 8297 Build/JDQ39) AppleWebKit/533.1 (KHTML, like Gecko)Version/4.0 MQQBrowser/4.4 Mobile Safari/533.1
What is expected?
render normally
What is actually happening?
alert
TypeError Cannot set property 'undefined' of null
if i remove style="stroke: #FFDA05;"
on SVG, it will be ok
Activity
posva commentedon Jul 9, 2019
Everything seems to work fine on Android 4.2 and 4.1 with Chrome. I have no way to test on qqBrowser.
Could you try by using
:style.prop="'stroke: #FFDA05;'"
instead?fix(vnode): support for browsers that do not support svg
tengmaoqing commentedon Jul 10, 2019
If I using

:style.prop="'stroke: #FFDA05;'"
instead, it is working fine.But,
this is because it is assigned like this by using the
prop
modifier.In general, Vue is updating

style
throughsetProp
.In some Android browsers that don't support SVG, The style attribute of the Element generated by createElementNS is null.

(
vnode.elm.style
is null.)There is also a problem with using
v-show
in this case.