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

safari、mobile device set not working #25

Open
underas opened this issue Jan 9, 2019 · 1 comment
Open

safari、mobile device set not working #25

underas opened this issue Jan 9, 2019 · 1 comment

Comments

@underas
Copy link

underas commented Jan 9, 2019

不好意思想請問一下:
在chrome IE firefox上set值可以執行
但發現 safari 與手機上瀏覽器(實測chrome與safari) 無反應
我的情況是 我透過session將A頁的 county與district傳到B頁中 並想塞入到B頁面的select內
html部分:
2019-01-09 6 26 20
js部分:
2019-01-09 6 25 31

查詢 台北市 松山區
console出來session值 為台北市松山區
但另外有監看change時候value的變化 發現皆為default值 (此case為中正區)

safari上顯示與console部分:

2019-01-09 6 27 05

2019-01-09 6 27 12

chrome 對比部分:
輸入 宜蘭縣 礁溪鄉

console結果如下

session收到宜蘭縣礁溪鄉
onchange觸發第一次 切換縣市 所以為 宜蘭市 第二次為更改區域 切換為礁溪鄉 輸出成功

chrome console 如下:
2019-01-09 6 27 24

想請問有推薦辦法解決safari與mobile device的部分嗎?

@mineschan
Copy link

Try to use below code after new TWzipcode

let updateSelect = function(){
         twzipcode.set({
                   'county': C,
                   'district': B,
         });
}
setTimeout(updateSelect, 0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants