类型范围输入无法在Google Chrome上运行

时间:2017-03-24 13:57:49

标签: angularjs input slider mobile-angular-ui

我有一个应用程序,后端是Django,前端是Angular。我面临的一个问题是,在我的某个模板中,我的输入类型范围未显示,但仅限于谷歌浏览器,并且只有在移动视图中时才会显示。它适用于Firefox,Safari和滑块将显示在那里,但在Chrome中它只能在桌面屏幕宽度上显示。错误控制台中没有任何内容表明它可能与Angular错误有任何关系,我说这是因为我使用的是mobile-angular-ui,它对滑动功能非常重要,并且因为它似乎只是一个移动问题。我还尝试过几个第三方滑块库,例如http://rangeslider.js.org/https://github.com/dwyl/range-touch,但仍然没有。我的Chrome版本是56.0.2924.87。这是其他人在过去或过去经历过的问题吗?

1 个答案:

答案 0 :(得分:1)

它是否发生在iPhone上?

Sub HideHolidays()

    Dim beginRow As Long, rowCnt As Long, chkCol As Long

    beginRow = 4
    chkCol = 1
    With Worksheets("2017 All Districts") '<--| reference your sheet
        With .Range(.Cells(beginRow, chkCol), .Cells(.Rows.Count, chkCol).End(xlUp)) '<--| reference referenced sheet 'chkCol' column from row 'beginRow' down to last not empty one
            .EntireRow.Hidden = False 'unhides all referenced range rows: subsequent code will hide relevant ones if referenced sheet R3 cell isn't "Yes"
            If .Parent.Range("R3").Value <> "Yes" Then Exit Sub    '<--| exit if referenced range sheet R3 cell value isn't "Yes"
            For rowCnt = 1 To .Rows.Count '<--| loop through all referenced range cells
                .Cells(rowCnt, 1).EntireRow.Hidden = Not IsError(Application.Match(CDbl(.Cells(rowCnt, 1)), Worksheets("Holidays").Range("$B$2:$B$11"), 0)) '<--| hide current cell entire row if its content doesn't match any value in "Holidays" sheet range $B$2:$B$11
            Next
        End With
    End With

End Sub

根据http://fortuito.us/diveintohtml5/forms.html#type-range,Safari,Chrome和Opera都将此视为滑块控件。 (遗憾的是,iPhone将其渲染为一个简单的文本框。它甚至没有优化其屏幕键盘进行数字输入。)所有其他浏览器只是将字段视为type =&#34; text&#34;,所以有没理由你不能马上开始使用它。

请参阅https://www.wufoo.com/html5/types/8-range.html以查看浏览器支持。