powergov Posted April 23, 2019 Share Posted April 23, 2019 with some browser,For example, Wechat's browser Before input When input, IOS moves the interface up,like this But when the input is complete, IOS restores the interface to the position before the exhaled keyboard, but unigui does not get the restored position. This problem does not occur in the browsers that come with IOS or Android's own browsers, but it happens as long as the browsers that come with wechat under ios. And we use Wechat here is the most common, think that such a simple input problem can not be solved, there is no way to put into practice. Link to comment Share on other sites More sharing options...
powergov Posted April 23, 2019 Author Share Posted April 23, 2019 Link to comment Share on other sites More sharing options...
powergov Posted April 23, 2019 Author Share Posted April 23, 2019 @Sherzod My solution to searching for someone else is to scroll the page when the input box loses focus, code as follows: function kickBack() { setTimeout(() => { window.scrollTo(0, document.body.scrollTop + 1); document.body.scrollTop >= 1 && window.scrollTo(0, document.body.scrollTop - 1); }, 10) } But I don't know where in unigui, how to write a code like that. Link to comment Share on other sites More sharing options...
Sherzod Posted April 23, 2019 Share Posted April 23, 2019 37 minutes ago, powergov said: My solution to searching for someone else is to scroll the page when the input box loses focus Hi, How should we understand this? Can you expalin in more details? Link to comment Share on other sites More sharing options...
powergov Posted April 23, 2019 Author Share Posted April 23, 2019 I added the following code to unimedit's extevents - > bulr to solve this problem temporarily, but I don't know if it's the right way to do it. setTimeout(() => { window.scrollTo(0, document.body.scrollTop + 1); document.body.scrollTop >= 1 && window.scrollTo(0, document.body.scrollTop - 1); }, 10) Link to comment Share on other sites More sharing options...
powergov Posted April 23, 2019 Author Share Posted April 23, 2019 31 minutes ago, Sherzod said: Hi, How should we understand this? Can you expalin in more details? 1. If the operating system is IOS 2. If you use the built-in browser of Wechat When both situations are satisfied When input, the node with relative positioning (fixed, absolute: relative to the browser form) will be displaced, resulting in the node click event offset and can not be selected, that is to say, the page can not rebound after the input box loses focus. Other people's solution is to slide the page again. I solved the problem by adding the following code to extevents - > blur, imitating the way others did. setTimeout(() => { window.scrollTo(0, document.body.scrollTop + 1); document.body.scrollTop >= 1 && window.scrollTo(0, document.body.scrollTop - 1); }, 10) Link to comment Share on other sites More sharing options...
Sherzod Posted April 23, 2019 Share Posted April 23, 2019 At the moment, I can not test for the above requirements. 26 minutes ago, powergov said: unimedit's extevents - > bulr to solve this problem temporarily, but I don't know if it's the right way to do it. If it works, then of course you can use this event at the moment. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now