Giter VIP home page Giter VIP logo

wdui's Issues

Scroller上拉无效

scroller同时设置了上拉和下拉,结果只有下拉有效,上拉不触发

有个小建议

progress bar range滑块这样基础的组件应该加进去,觉得还可以

supportWebp 方法导致某些浏览器闪现一个 "!" 符号

现象

在某些浏览器上(具体有哪些未做全面测试), 页面会出现一个 "!" 符合, 然后又消失了.

重现这个 bug 的手机为: iPhone 6 Plus iOS 8.3

浏览器的 UA 信息为:
Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12F70

PS: 我们的 webview 用的是 UIWebView, 比较老式

排查问题

为了排查这个诡异的问题, 把代码翻了个遍, 从 install 入口开始, 一个个组件排查, 然后定位在 Lazyload 组件, 最终定位在 src/utils/common.js#supportWebp

    let el = d.createElement('object')
    el.type = 'image/webp'
    // --------------------
    // 就是这个诡异的 "!" 符号会在页面上闪现一下
    el.innerHTML = '!'
    // --------------------
    d.body.appendChild(el)
    support = !el.offsetWidth
    d.body.removeChild(el)

虽然在很多浏览器上都不会闪现出 "!" 符号, 但我们确实碰到了这个问题, 希望改进下方式, 例如给这个元素添加一个透明度的样式, 让其添加到页面时不会显示出来.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.