Make WordPress Core


Ignore:
Timestamp:
12/16/2014 03:51:54 PM (8 years ago)
Author:
johnbillion
Message:

Do not autofocus text fields on page load on mobile devices. This is currently broken in many mobile browsers:

  • iOS Safari opens the keyboard and auto-scrolls on the first tap anywhere on the screen triggering the click at an unexpected place. That makes it impossible to follow links or press buttons.
  • Chrome on iOS opens the keyboard on load and may scroll the focused field off screen.
  • The Android 4.4 browser only highlights the field, the user has to tap it to open the keyboard and type.

Merges [30842] to the 4.1 branch.

See #30703.

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/src/wp-admin/edit-tags.php

    r30649 r30908  
    584584</div><!-- /col-container -->
    585585</div><!-- /wrap -->
     586
     587<?php if ( ! wp_is_mobile() ) : ?>
    586588<script type="text/javascript">
    587589try{document.forms.addtag['tag-name'].focus();}catch(e){}
    588590</script>
    589591<?php
     592endif;
     593
    590594$wp_list_table->inline_edit();
    591595
Note: See TracChangeset for help on using the changeset viewer.