PDA

View Full Version : [CLOSED] Ext.dom.Element.setVisible not working properly in modern toolkit



movys
5 Aug 2015, 11:42 PM
Ext version tested:

Ext 6.0.1 rev 47
Ext 6.0.0 rev 640
Browser versions tested against:

Chrome 43.0.2357.132 (64-bit)
DOCTYPE tested against:

html
Description:

The following fiddle works as expected with Neptune Classic toolkit. It does not work with modern tookit.
https://fiddle.sencha.com/#fiddle/rnr

The div element containing "It works" should have been displayed but it remains hidden instead. Cursory look into the Ext code reveals that the method in the classic toolkit works by setting the style "display: block/none" and/or "visibility:visible/hidden" (depending on the visibility mode) but in the modern toolkit it either adds or remove CSS classes (e.g. "x-hidden-display" or "x-hidden-visibility").

This prevents me from having a single controller for both modern and classic views.
Is this discrepancy purposeful? The classical implementation seeems to make more sense.

Steps to reproduce the problem:

Run the fiddle.

The result that was expected:

The div containing "It works" should be visible.

The result that occurs instead:

The div remains hidden.

evant
6 Aug 2015, 1:28 AM
You can use the setDisplayed method.

movys
6 Aug 2015, 1:43 AM
True, but I still want to be able to utilize the second argument to setVisible (animate) which is there in classic.
The suggested workaround is OK for basic displaying/hiding. It would be nice to have full parity between classic and modern.