A hacky fix to adding comments to reviews mobile
Review Request #5441 — Created Feb. 8, 2014 and discarded — Latest diff uploaded
A hacky fix to adding comments to reviews mobile
Originally, when the user tries to "Add comment" on a review from a mobile
device, the browser zooms extremely closely to the input field, and becomes
very difficult to type in the box as the cursor becomes too large.This was caused by several reasons:
1) Mobile browsers have a zoom system based on the font-size of the input or
textarea
2) The CodeMirror library that was used for the textarea to enable typing code
had a very badly written textarea styling which consisted of font-size: 4pxDue to these, the browser zoomed an unnecessary amount, even though the actual
textarea size was much bigger (CodeMirror does not use the original textarea)The fix sets the textarea font-size to 32px, and does a hacky fix to the
zooming. This is done by listening to the mouseover event on textarea, and
disabling zoom during that time until mousedown, which fixes the browser zoom
Testing completed through accessing local server through iPhone 5S.