Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

b:buttonGroup last Item #816

Closed
stevekv opened this issue Jul 10, 2017 · 10 comments
Closed

b:buttonGroup last Item #816

stevekv opened this issue Jul 10, 2017 · 10 comments
Assignees
Milestone

Comments

@stevekv
Copy link

stevekv commented Jul 10, 2017

Hi,

just found out that if one uses tooltips on the last button in a button group, that button gets rendered in a wrong way - the corners don't have a radius because its interpreted as internal button. That is due to the fact that the last element in the button group is not the button but the script tag associated with the tooltip for the last button. Stinking feature of bootstrap because that will be hard to fix when the button does not know if it is in a button group (it does not need to know except for this bug). It works if the script and the button html change places. But one can not do that for all the buttons in the group, because then the problem is shifted to the first button :(

Stephan

@stephanrauh
Copy link
Collaborator

This ticket rings a bell. Some time ago, we had a similar bug. I hope it's not a recurring bug :).

@stephanrauh
Copy link
Collaborator

Wait. We did solve this problem some time ago by shifting the JavaScript code into the <button> tag (as opposed to putting it behind the <button> tag). Which BootsFaces version are you using?

<button id="j_idt189" name="j_idt189" type="button" class="btn btn-default" data-toggle="tooltip" data-placement="auto" data-container="body" title="" data-original-title="last">4<script type="text/javascript">$(function () {
$('#j_idt189').tooltip({'delay':{show:0,hide:0}})
});
$('.tooltip').tooltip('destroy'); </script></button>
<b:buttonGroup>
  <b:button value="1" tooltip="first"/>
  <b:button value="2" tooltip="second"/>
  <b:button value="3" tooltip="third"/>
  <b:button value="4" tooltip="last"/>
</b:buttonGroup>

image

@stevekv
Copy link
Author

stevekv commented Jul 11, 2017

I'm currently using maven dependency with version 1.1.0.

update: I had the same error with version 1.1.1
btngroup

@stephanrauh
Copy link
Collaborator

Can you send me a reproducer? In this case, that'd be the XHTML file. Plus, I'd like to see the generated HTML code.

I can't promise anything, but the next version of BootsFaces is scheduled for Saturday, and I'd like to fix this error in 1.1.2.

@stevekv
Copy link
Author

stevekv commented Jul 12, 2017

Attached two files. nachbuchung.xhtml the source code and nachbuchung.html the rendered code.

nachbuchung.zip

@stevekv
Copy link
Author

stevekv commented Jul 12, 2017

Guess I found the problem. I forgot to tell you, that I've used CommandButtons. The ButtonRenderer is Ok. In the CommandButtonRenderer the Tooltip.activateTooltips() Method is called after the endElement("button").

commandbutton

stephanrauh added a commit that referenced this issue Jul 12, 2017
@stephanrauh stephanrauh added this to the v1.1.2 milestone Jul 12, 2017
@stephanrauh
Copy link
Collaborator

Thanks for the extra info! I've implemented your proposed solution and uploaded the new developer snapshot to Maven Central. See #369 on how to get it.

@stevekv
Copy link
Author

stevekv commented Jul 13, 2017

Excellent, the last button now has a radius. I tip my hat in your general direction ;-)

Unfortunately there is another issue. Since I switched to 1.1.2-SNAPSHOT, the datatables have a nasty scollbar (checked on chrome, IE and Firefox - no scaling issue):

datatable

@chongma
Copy link
Collaborator

chongma commented Jul 13, 2017

This is caused by #794. The overflow needs to be fixed somehow

@stephanrauh
Copy link
Collaborator

That's the answer to my (unspoken) question: Yes, we do need to make the new datatable wrapper configurable. The challenge is to find a good name :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants