Opened 8 years ago

Closed 7 years ago

#7814 closed bug (wontfix)

Button: Exception - htmlfile: Unexpected call to method or property access.

Reported by: jimmyheaddon Owned by:
Priority: minor Milestone: 1.11.0
Component: ui.button Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:

Description

If you create a button using jQuery UI 1.8.16, jQuery 1.6.4 and Internet Explorer 8 it generally works fine if you declare the button as so:

<button id="test">Hello World</button>, calling it as $('#test').button();

But if you try and use an img tag to create an image button as so:

<img id="test" class="ui-corner-all" src="url/to/image.png" alt="Alt" />, and call it the same as before $('#test').button() you will get the following exception message

"htmlfile: Unexpected call to method or property access."

The button is actually created on the page and shows through with the image specified centered correctly, and all of the hover-active-etc states work, but it will only perform the .button() function on the first instance if you call $('img').button() as a crude example, and it will still throw the exception once.

Is it also possible for a label like in the <button> example above to be shown for an <img> based button, shown under the image but still within the confines of the button itself?

Regards

Change History (2)

comment:1 Changed 7 years ago by Scott González

Milestone: 1.9.01.11.0

comment:2 Changed 7 years ago by petersendidit

Resolution: wontfix
Status: newclosed
Summary: jQueryUI Button Exception - htmlfile: Unexpected call to method or property access.Button: Exception - htmlfile: Unexpected call to method or property access.

It would be much better to wrap you image in a clickable element, <a> <button> and call the button element on that.

Note: See TracTickets for help on using tickets.