Hi, im creating a small app and in need of button inside tabs. tabs and buttons are working properly (if they are seperate) however, when i put button ui in tabs ui "tabsbutton" were changed. i did a trace and i found out that the button was the antagonist.
i placed an alert box to ui-button.js _create and here's what i found
NOTE: first alert was placed in line 81 of button.js v1.9.2 2nd alert was placed in line 107 of button.js v1.9.2
First Ward - TabsUI Fully Loaded - Creation of first Button started (first button = tab button) - OK working Good!
Second Ward - Codes in Line 82-106 executed - Result "tab button changed"
ui-button.js "_create:" hooked tabs!!! maybe the cause is from css class names. im still finding a way to fix it but my mini brain is aching...
after burning hours i found the issue and i applied a temporary fix for it (and it works perfectly). Please inform the dev team about this and apply the best fix since this is really a BUG..
to recreate the issue create a tab (or use the one from demo) and add any type of button inside it [button, submit, anchor]
ui-tabs.js and ui.button.js works perfectly BUT both of these touches <a> tag (anchor). Our button is inside the tab so the first to create is tab but when creation of button arrives THE <A> TAG FROM TAB WAS CONSIDERED as button too.
the "this._determineButtonType();" function (from ui.button.js) finds all possible buttons in our markup and when it hits the <a> tag button from tabs, ui-button.js redraw it! I applied a temporary fix for it and traps if <a> is from tabs. here it is.. https://pastee.org/6aurt my fix was in line 68-78.. few line but it really helps..
im using jquery.ui.button.js & jquery.ui.tabs.js both from v1.9.2 package
Leave a comment on ma0huxai's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic