Some little knowledge about the H5app.

Since I am also the first single development H5APP, all pit encountered more, say a few points below it;

1, first of all to share knowledge on a point, with regard to the input box; sometimes demand to click enter to search in the phone keyboard. Many point to this point, it needs to be considered for H5, can refer https://blog.csdn.net/xialong_927/article/details/92628634 , if you've read this article, there is a point, input box type to attribute is set to search; otherwise become unable to make the enter key search words, but this set, on the phone ios you will find input box becomes elliptical in style when you do not set; this would require students think clearly in the end how you want to use to pull!

2, do not know the students have not encountered such a problem, that is, on the phone in Android soft keyboard pops up after you, did not let the input box loses focus, this time you also occupy the position of the soft keyboard, and then return to another page ; this time will result in a portion of the bottom of the blank, and blank position happens to be soft keyboard position occupied; on this issue, I when the solution is relatively simple, I'll just get to his height before the page is returned, then, after the return value I will set his hand to his height, so as not to be affected by soft keyboard makes a placeholder;

3, I was writing projects when there is a time-effectiveness, with cookie will be a little better I was considering, but the result is displayed undefined, Baidu and found some Android 5.0 or cookie to the browser very friendly;

4, input frame Focus soft keyboard pops up problems ios end; when I found that the development of ios end, input frame Focus on the soft keyboard pops up the first time soon, back to no effect, we must press for the job; If students encounter, only need to add an input onfocus time on the line, when clicked manual focus;

5, at the end of Android soft keyboard will pop up at the bottom footer navigation bar to the top, because the bottom needs to be fixed positioning and bottom: 0, so this will go on top, this problem is solved I: When I was focused soft keyboard pops up will set the bottom footer, display: none, then loses focus when the display: block, of course, a lot of the solution, depends on your preferences;

Well, I do not remember the other, and how important it should not. If you see, we are hoping to spot a praise!

  

Guess you like

Origin www.cnblogs.com/chenjl-bling/p/11230652.html