Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery mobile : ui-helper-hidden-accessible

In my html code:

<div data-role="fieldcontain" id="containdiv" class="no-field-separator">
    <label for="field1" class="ui-hidden-accessible">To</label>
    <input type="search" name="field1" id="field1" autocorrect="off" autocapitalize="off" autocomplete="off" placeholder="Field #1?" value="" />
    <input type="hidden" id="field1val" name="field1val"/>
</div>

In the DOM, after being processed by jQUery mobile, has inserted the follwing element

<span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>

In between my search input and my hidden input.

As the user types in my search input, I do some stuff, and update the value of the hidden field with it.

As this happens, I notice that this span (with class "ui-helper-hidden-accessible") has its content updated with the value of the hidden input.

I am not sure what is happening, or what this is triggered by.

Investigating, I have found that: http://forum.jquery.com/topic/ui-helper-hidden-accessible-change

The purpose of this field is actually for it to be "hidden but still accessible", however, this does not appear to be the case - it renders as visible within the browser.

Is there a way to disable jQuery from creating this element within my form?

like image 973
bguiz Avatar asked Dec 04 '22 00:12

bguiz


2 Answers

Hide the class on focus:

$( ".selector" ).autocomplete({
focus: function (event, ui) {
                $(".ui-helper-hidden-accessible").hide();
                event.preventDefault();
            }
});
like image 106
ThdK Avatar answered Dec 05 '22 14:12

ThdK


You can try this.

.ui-helper-hidden-accessible { display:none; }
like image 42
Manish Kundu Avatar answered Dec 05 '22 14:12

Manish Kundu