Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Floating buttons not working

allancmello pro asked 5 years ago


Expected behavior enter image description here

Actual behavior

enter image description here

enter image description here

Imports app.modules.ts:

enter image description here

app.components.html:

enter image description here

My style.css:

enter image description here enter image description here

Is this a bug in this version? what's the problem?


Konrad Stępień staff commented 5 years ago

Hi @allancmello, the problem still exists if you remove , char in styless.scss in line with #inro-section?


allancmello pro commented 5 years ago

Problem solved! Removed code in the app.component.ts:

ngAfterViewInit() { const buttons = document.querySelectorAll('.btn-floating'); buttons.forEach((el: any) => { this.renderer.removeClass(el, 'btn-floating'); this.renderer.addClass(el, 'px-3'); this.renderer.addClass(el.firstElementChild, 'fa-3x'); }); }

this code in the event ngAfterViewInit was causing the Floatting Button error

Thanks Stepien


Konrad Stępień staff commented 5 years ago

Hi @allancmello,

Thanks for the information. If you have any problem please tell me about it :)


allancmello pro answered 5 years ago


Hi Stepien, I had already removed the comma ( , ), the problem continues, see this site in version MDB 8.0.4, it works!

enter image description here

enter image description here

Other buttons work, the problem is only in the Floating Button

enter image description here



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.8.0
  • Device: Desktop
  • Browser: all
  • OS: Windows
  • Provided sample code: No
  • Provided link: No